Catch the socket error upon socket shutdown.
This commit is contained in:
parent
6b87994a94
commit
9af4d65b67
1 changed files with 2 additions and 2 deletions
|
@ -315,12 +315,12 @@ class MatrixServer:
|
|||
server_buffer_prnt(self, message)
|
||||
|
||||
def _close_socket(self):
|
||||
# type: (socket.socket) -> None
|
||||
# type: () -> None
|
||||
if self.socket:
|
||||
try:
|
||||
self.socket.shutdown(socket.SHUT_RDWR)
|
||||
self.socket.close()
|
||||
except OSError:
|
||||
except socket.error:
|
||||
pass
|
||||
|
||||
def disconnect(self, reconnect=True):
|
||||
|
|
Loading…
Add table
Reference in a new issue