Commit afd46da
committed
Fix connection close by server treatment by WebSocket channels (#684)
The lack of set channel._open to false when the onclose event is triggered was causing the channel be broken without the other parts of the driver notice. In tbis way, a next iteration trying to get the broken connection will succeded in the try and run the query will result in a eternal pending promise.
Mark the channel as closed enable the pool to discard and create a new connection if it needed.1 parent 694b9ea commit afd46da
File tree
2 files changed
+25
-3
lines changed- src/internal/browser
- test/internal/browser
2 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
244 | 243 | | |
245 | 244 | | |
246 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
247 | 270 | | |
248 | 271 | | |
249 | | - | |
250 | 272 | | |
251 | 273 | | |
252 | 274 | | |
253 | 275 | | |
254 | 276 | | |
255 | 277 | | |
256 | 278 | | |
257 | | - | |
258 | 279 | | |
259 | 280 | | |
260 | 281 | | |
| |||
0 commit comments