Commit aed51aa
fix(js-sdk): emit error event on watcher timeout to prevent start() hanging
Timeout paths in both WebSocket and pollLoop were calling close()
without emitting an error event, which would cause the start() Promise
to hang indefinitely. Now emits an error event before closing so the
Promise properly resolves.
Co-Authored-By: gaurav <gauravchadha1676@gmail.com>1 parent abeb2a7 commit aed51aa
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| |||
263 | 266 | | |
264 | 267 | | |
265 | 268 | | |
266 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| |||
0 commit comments