mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #16717: get rid of socket.error, replace with OSError
This commit is contained in:
parent
ad28c7f9da
commit
0832af6628
39 changed files with 169 additions and 167 deletions
|
@ -299,7 +299,7 @@ class BaseServer:
|
|||
"""
|
||||
try:
|
||||
request, client_address = self.get_request()
|
||||
except socket.error:
|
||||
except OSError:
|
||||
return
|
||||
if self.verify_request(request, client_address):
|
||||
try:
|
||||
|
@ -479,7 +479,7 @@ class TCPServer(BaseServer):
|
|||
#explicitly shutdown. socket.close() merely releases
|
||||
#the socket and waits for GC to perform the actual close.
|
||||
request.shutdown(socket.SHUT_WR)
|
||||
except socket.error:
|
||||
except OSError:
|
||||
pass #some platforms may raise ENOTCONN here
|
||||
self.close_request(request)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue