The potential problem I am fixing here occurs when socket.shutdown fails and doesn’t proceed to socket.close to clean up the socket and allow garbage collection to release the memory used for it.
The OSError on shutdown can occur when the remote side of the connection closes the connection first.
The potential problem I am fixing here occurs when
socket.shutdown
fails and doesn’t proceed tosocket.close
to clean up the socket and allow garbage collection to release the memory used for it.The
OSError
on shutdown can occur when the remote side of the connection closes the connection first.