Commit 9cff42c
committed
fix: error is raised when DevTools are closed while sending message
In case you open Chrome DevTools and close them while the iOS runtime still sends messages, an error is raised in CLI:
```
Error: WebSocket is not open: readyState 2 (CLOSING)
```
The problem is that we are using Transform stream between the communication and close event of the socket is not raised until the stream flushes its current state.
Fix it by skipping the write operation in case the socket is not in OPEN state.1 parent 2df6ae6 commit 9cff42c
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
| |||
0 commit comments