fix(mcp): a close doesn't wait on a client's open event stream
A standalone event stream (the GET an MCP client keeps open) is no answer on its way out and ends only with its session, which a close ends after it has waited for the answers: counting it as an answer made every close sit out the whole grace (10 s) whenever an assistant was connected, and a bridge asking meanwhile could stall for its own 60 s. Only POSTs are counted, as the server's own close counts them. A hand demonstration found it; the new test (an rmcp client with its stream open, the close answered within 5 s) fails without the fix (12 s). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89403a7159
commit
8056e3bbc8
3 files changed
+55
-2
No files matched your search
@@ -4311,6 +4311,7 @@ one book never refuses or holds up a call on another.
|
||||
| `book_open_close::the_open_option_takes_none_and_refuses_a_book_that_doesnt_exist` | `--open none` leaves every book closed; `--open nobody` exits 2 before opening anything |
|
||||
| `book_open_close::the_sessions_request_names_each_connection_and_never_its_token` | over the real socket: two tokens, two clients, an agent's report, neither token's text nor SHA-256 in the answer, an ended session gone, a close ends the book's sessions |
|
||||
| `book_open_close::closing_and_opening_a_book_over_and_over_loses_and_duplicates_nothing` | the hammer: 6 agents on one book and 4 on another make journaled drafts and reads while the first is closed and reopened 12 times; both journals are replayed afterwards: every acknowledged draft is in its journal exactly once under the id it was told, no refused call left anything, the closed book's journal and access log never moved between the close answer and the reopening, the other book never refused a call and kept answering while the first was closed, and the books replay with gapless ids |
|
||||
| `book_open_close::a_close_doesnt_wait_for_a_clients_open_event_stream` | an rmcp client keeps its standalone event stream (a GET) open: closing its book still answers at once, not after the grace for answers on their way out (it took 12 s while the stream was counted as an answer, which stalled the bridge in a hand demonstration) |
|
||||
| `commands::tests::doctor_says_who_is_connected` | the doctor's lines for sessions |
|
||||
|
||||
**For P12 (mutation targets).** `Gate::enter` (count before looking at `shut`),
|
||||
|
||||
Reference in new issue
Block a user