Skip to content

Commit

Permalink
Fix a race condition in bulb.py when closing while a bulb is offline
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmv authored Nov 8, 2023
1 parent a11d2c7 commit 0eb077b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywizlight/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ async def _send_udp_message_with_retry(
send_wait = FIRST_SEND_INTERVAL
total_waited = 0.0
for send in range(MAX_SEND_DATAGRAMS):
if transport.is_closing() or response_future.done():
if transport is None or transport.is_closing() or response_future.done():
return
attempt = send + 1
_LOGGER.debug(
Expand Down

0 comments on commit 0eb077b

Please sign in to comment.