Commit 2d099e2
authored
Merge pull request #2872 from c3d1c06c-bf26-477e-b0eb-c50ef4477ba6/master
The Problem:
The current code creates a new WebSocket connection in the reconnection callback but stores it in a local variable (newWs), leaving the global ws variable pointing to the closed connection.
This causes the polling fallback to continue running even after a successful WebSocket reconnection, resulting in duplicate metric updates.
The Solution:
By directly assigning to the global ws variable, the fix ensures that:
- The polling check at line 367 (if (!ws || ws.readyState !== WebSocket.OPEN)) works correctly
- Only one update mechanism (WebSocket or polling) runs at a time
- The dashboard doesn't receive duplicate updates.1 file changed
+10
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
| 341 | + | |
| 342 | + | |
345 | 343 | | |
346 | 344 | | |
347 | 345 | | |
| |||
350 | 348 | | |
351 | 349 | | |
352 | 350 | | |
353 | | - | |
| 351 | + | |
354 | 352 | | |
355 | 353 | | |
356 | 354 | | |
| |||
459 | 457 | | |
460 | 458 | | |
461 | 459 | | |
462 | | - | |
| 460 | + | |
0 commit comments