mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 18:35:45 +01:00
close Connection socket after server disconnect
This commit is contained in:
parent
c91d35ffa4
commit
4763f4363b
1 changed files with 3 additions and 0 deletions
|
|
@ -328,6 +328,9 @@ def close(self):
|
|||
self.handle_event = None # prevent reference cycles
|
||||
try:
|
||||
self.socket.shutdown(socket.SHUT_WR)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
self.socket.close()
|
||||
except OSError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue