Skip to content

Commit 3244581

Browse files
authored
fix: throw when driver crashes (#1798)
1 parent 92bb1d0 commit 3244581

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

playwright/_impl/_transport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ async def run(self) -> None:
154154
obj = self.deserialize_message(buffer)
155155
self.on_message(obj)
156156
except asyncio.IncompleteReadError:
157+
if not self._stopped:
158+
self.on_error_future.set_exception(
159+
Exception("Connection closed while reading from the driver")
160+
)
157161
break
158162
await asyncio.sleep(0)
159163

0 commit comments

Comments
 (0)