1
0

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:
Neil Booth
2015-06-04 16:30:59 +09:00
parent 90d7179d73
commit 2f2e468d0a
2 changed files with 3 additions and 7 deletions

View File

@@ -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()