Repository navigation
Commit 862fdc9
committed
fix(server): reject sends during auth-failure session teardown
Addresses a review finding: after close() on an auth-failure teardown, the
context stayed in `sessions` until the async stream exit ran stopSessionInternal,
so a sendTurn in that window passed requireSession and enqueued a prompt onto
the closed query.
Mark the session closed right after close() so requireSession rejects sends,
and make hasSession treat a closed status as not active so a recovery can
replace the dying process promptly.1 parent dee6e42 commit 862fdc9
2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
5683 | 5687 | | |
5684 | 5688 | | |
5685 | 5689 | | |
| 5690 | + | |
| 5691 | + | |
| 5692 | + | |
| 5693 | + | |
| 5694 | + | |
| 5695 | + | |
| 5696 | + | |
| 5697 | + | |
| 5698 | + | |
| 5699 | + | |
| 5700 | + | |
| 5701 | + | |
5686 | 5702 | | |
5687 | 5703 | | |
5688 | 5704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3136 | 3136 | | |
3137 | 3137 | | |
3138 | 3138 | | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
3139 | 3152 | | |
3140 | 3153 | | |
3141 | 3154 | | |
| |||
4858 | 4871 | | |
4859 | 4872 | | |
4860 | 4873 | | |
4861 | | - | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
| 4879 | + | |
4862 | 4880 | | |
4863 | 4881 | | |
4864 | 4882 | | |
| |||
0 commit comments