bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)
Signed-off-by: Christian Heimes <christian@python.org>
diff --git a/Lib/http/server.py b/Lib/http/server.py
index fa204fb..ee99182 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -414,7 +414,7 @@ def handle_one_request(self):
method = getattr(self, mname)
method()
self.wfile.flush() #actually send the response if not already done.
- except socket.timeout as e:
+ except TimeoutError as e:
#a read or a write timed out. Discard this connection
self.log_error("Request timed out: %r", e)
self.close_connection = True