Skip to content

Commit cb94c25

Browse files
authored
fix(connect): Future exception was never retrieved on close() (#2427)
1 parent 5b64618 commit cb94c25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

playwright/_impl/_connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ def cleanup(self, cause: Exception = None) -> None:
293293
for ws_connection in self._child_ws_connections:
294294
ws_connection._transport.dispose()
295295
for callback in self._callbacks.values():
296+
# To prevent 'Future exception was never retrieved' we ignore all callbacks that are no_reply.
297+
if callback.no_reply:
298+
continue
296299
callback.future.set_exception(self._closed_error)
297300
self._callbacks.clear()
298301
self.emit("close")

0 commit comments

Comments
 (0)