Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed May 6, 2022
1 parent f7f0188 commit 9afa718
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zeroconf/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ async def _async_close(self) -> None:

def _async_shutdown(self) -> None:
"""Shutdown transports and sockets."""
self.running_event.clear()
if self.running_event:
self.running_event.clear()
for transport in itertools.chain(self.senders, self.readers):
transport.close()

Expand Down

0 comments on commit 9afa718

Please sign in to comment.