Commit bd8288d
committed
fix(web): consolidate gw.inner read locks in build_gon_data to prevent deadlock
build_gon_data previously acquired gw.inner.read() three times across
build_nav_counts (hooks count) and the main function (heartbeat_config,
channels_offered, update). With tokio's fair RwLock, if a concurrent
WS handler requests a write lock between these reads, the subsequent
read blocks indefinitely — causing page.goto to hang with zero HTTP
response on CI.
Consolidated all three reads into a single lock acquisition at the
start of build_gon_data, eliminating the deadlock window.1 parent f773171 commit bd8288d
1 file changed
Lines changed: 18 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | 361 | | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
368 | 366 | | |
369 | 367 | | |
370 | | - | |
| 368 | + | |
371 | 369 | | |
372 | 370 | | |
373 | 371 | | |
| |||
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
389 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
390 | 403 | | |
391 | 404 | | |
392 | 405 | | |
| |||
409 | 422 | | |
410 | 423 | | |
411 | 424 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | 425 | | |
420 | 426 | | |
421 | 427 | | |
| |||
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
494 | | - | |
| 500 | + | |
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
| |||
0 commit comments