Commit f2f05945 authored by Guido van Rossum's avatar Guido van Rossum

Laurence Tratt notes that the accept() call in get_request() can fail,

and suggests putting a try/except around the get_request() call in
handle_request().  (All in class TCPServer.)
parent e55702b0
......@@ -207,7 +207,10 @@ class TCPServer:
def handle_request(self):
"""Handle one request, possibly blocking."""
request, client_address = self.get_request()
try:
request, client_address = self.get_request()
except socket.error:
return
if self.verify_request(request, client_address):
try:
self.process_request(request, client_address)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment