Commit 3c3340c
committed
fix(server): add keepalive timer in replayEvents() and fix test
The replayEvents() code path (client reconnects with Last-Event-ID) was
missing keepalive timer setup, so reconnecting clients would lose
keepalive protection and get dropped again at the next proxy idle
timeout.
Also fixes the cleanup test to actually prove that close() clears the
timer by asserting vi.getTimerCount() drops to 0, instead of relying
on the catch fallback which would self-clear anyway.
Addresses PR review feedback from @felixweinberger on PR #1726.1 parent 3fdfb75 commit 3c3340c
File tree
2 files changed
+15
-2
lines changed- packages/server
- src/server
- test/server
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
585 | 598 | | |
586 | 599 | | |
587 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
| 1040 | + | |
1040 | 1041 | | |
1041 | 1042 | | |
1042 | 1043 | | |
1043 | 1044 | | |
1044 | | - | |
1045 | | - | |
| 1045 | + | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
0 commit comments