Fix api client disconnect handler

This commit is contained in:
Otto Winter 2019-07-01 11:09:20 +02:00
parent 894ec07cc8
commit 71ba4bc31c
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -321,7 +321,7 @@ class APIClient(threading.Thread):
self._close_socket()
if self.on_disconnect is not None and on_disconnect:
self.on_disconnect()
self.on_disconnect(None)
def _check_authenticated(self):
if not self._authenticated:
@ -410,7 +410,7 @@ class APIClient(threading.Thread):
self._socket = None
self._connected = False
if self.on_disconnect is not None:
self.on_disconnect()
self.on_disconnect(None)
elif isinstance(msg, pb.PingRequest):
self._send_message(pb.PingResponse())
elif isinstance(msg, pb.GetTimeRequest):