Only try to close the socket if it exists.
This commit is contained in:
parent
02c79e6adb
commit
007b2b5cad
1 changed files with 2 additions and 1 deletions
|
@ -303,6 +303,7 @@ def matrix_server_disconnect(server, reconnect=True):
|
|||
if server.fd_hook:
|
||||
W.unhook(server.fd_hook)
|
||||
|
||||
if server.socket:
|
||||
close_socket(server.socket)
|
||||
|
||||
server.fd_hook = None
|
||||
|
|
Loading…
Add table
Reference in a new issue