Uh oh!
There was an error while loading. Please reload this page.
StreamableHttp -- resumability support for servers - #587
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| msg_writer, msg_reader = anyio.create_memory_object_stream[ | ||
| tuple[JSONRPCMessage, str | None] | ||
| ](0) | ||
| self._request_streams[stream_id] = msg_writer |
There was a problem hiding this comment.
will this cause leaking streams and unclosed resources?
There was a problem hiding this comment.
have a separate PR to review all resources and close them: #604
| last_event_id = request.headers.get(LAST_EVENT_ID_HEADER) | ||
| if last_event_id: | ||
| await self._replay_events(last_event_id, request, send) | ||
| return |
There was a problem hiding this comment.
| last_event_id=request.headers.get(LAST_EVENT_ID_HEADER) | |
| iflast_event_id: | |
| awaitself._replay_events(last_event_id, request, send) | |
| return | |
| iflast_event_id:=request.headers.get(LAST_EVENT_ID_HEADER): | |
| awaitself._replay_events(last_event_id, request, send) | |
| return |
Adding support for resumability to servers.
As we already have Typescript client that support resumability, testing it with it and the follow up is to add support for resumability on typescript client.
###How to test:
Start Python example server:
In the new terminal start Typescript client
Follow steps:
start-notifications 10 10escandEnterconnectstart-notifications 10 10- you'll see missing events were replayed and the tool continues to send notificationsstacked on top of #573