Skip to content

Commit

Permalink
FIXUP future cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpitt committed Aug 5, 2024
1 parent f483d29 commit 5fc99c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/common/bidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ async def close(self) -> None:

def ws_done_callback(self, future):
for fut in self.pending_commands.values():
fut.set_exception(WebdriverError("websocket closed"))
if not fut.done():
fut.set_exception(WebdriverError("websocket closed"))
if not future.cancelled():
log_proto.error("ws_reader crashed: %r", future.result())

Expand Down

0 comments on commit 5fc99c8

Please sign in to comment.