check if _disconnect_waiter is None when closing connection

pull/130/head
Marius Kriegerowski 2022-11-28 19:30:49 +01:00 zatwierdzone przez Florian Ludwig
rodzic 09ac98d39a
commit 19960e62df
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -163,7 +163,7 @@ class ClientProtocolHandler(ProtocolHandler):
async def handle_connection_closed(self):
self.logger.debug("Broker closed connection")
if not self._disconnect_waiter.done():
if self._disconnect_waiter is not None and not self._disconnect_waiter.done():
self._disconnect_waiter.set_result(None)
async def wait_disconnect(self):