Skip to content

Commit

Permalink
Merge pull request #168 from tjmv/fix-race-cond
Browse files Browse the repository at this point in the history
Fix a race condition in bulb.py when closing while a bulb is offline
  • Loading branch information
sbidy authored Jun 5, 2024
2 parents d4a7084 + 0eb077b commit 6c6e4a2
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 6c6e4a2

Please sign in to comment.