SocketPipe shouldn't close the socket.
This is a layering violation - the SocketPipe doesn't own the socket and provides no other way to close the socket, leading to unnecessary complexity like that in interface.py. I looked at deamon.py and NetworkProxy - the two other users, and they don't close the sockets explicitly, just let them be garbage collected.
This commit is contained in:
@@ -360,8 +360,7 @@ class SocketPipe:
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
data = ''
|
||||
|
||||
if not data:
|
||||
self.socket.close()
|
||||
if not data: # Connection closed remotely
|
||||
return None
|
||||
self.message += data
|
||||
self.recv_time = time.time()
|
||||
|
||||
Reference in New Issue
Block a user