Properly close discovery listeners (#225)

Fixes #214
This commit is contained in:
Pierre Ståhl
2020-12-07 22:20:21 +01:00
committed by GitHub
parent a74af936a4
commit b50ee8bb94

View File

@@ -49,7 +49,7 @@ class TuyaDiscovery(asyncio.DatagramProtocol):
lambda: self, local_addr=("0.0.0.0", 6667) lambda: self, local_addr=("0.0.0.0", 6667)
) )
self.listeners = await asyncio.gather(listener, encrypted_listener) self._listeners = await asyncio.gather(listener, encrypted_listener)
_LOGGER.debug("Listening to broadcasts on UDP port 6666 and 6667") _LOGGER.debug("Listening to broadcasts on UDP port 6666 and 6667")
def close(self): def close(self):