Skip to content

Commit

Permalink
drop communication_channel after DisconnectRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Dec 10, 2020
1 parent dd4ef04 commit a347590
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xknx/io/tunnel.py
Expand Up @@ -118,6 +118,7 @@ async def _reconnect(self):
# only send disconnect request if we ever were connected
if self.communication_channel is not None:
await self._disconnect_request(True)
self.communication_channel = None
await self.udp_client.stop()
await asyncio.sleep(self.auto_reconnect_wait)
await self.udp_client.connect()
Expand All @@ -137,6 +138,7 @@ async def stop(self):
self._stop_reconnect()
if self.communication_channel is not None:
await self._disconnect_request(False)
self.communication_channel = None
await self.udp_client.stop()

####################
Expand Down

0 comments on commit a347590

Please sign in to comment.