Right now, the streamable client transport establishes the standalone SSE stream as soon as it receives its initialized result, but does so asynchronously:
|
go c.handleSSE("hanging GET", nil, true, nil) |
This didn't matter much to us before (at least not in our tests), because we always guaranteed message delivery via our in-memory replay. However, as we look into disabling replay by default #580, some of our tests fail because the client can't establish a happens-before relationship such that background messages are guaranteed to be delivered.
Looking at the typescript SDK, it starts the request synchronously, immediately after sending 'initialized'.
Right now, the streamable client transport establishes the standalone SSE stream as soon as it receives its initialized result, but does so asynchronously:
go-sdk/mcp/streamable.go
Line 1134 in 31e97ad
This didn't matter much to us before (at least not in our tests), because we always guaranteed message delivery via our in-memory replay. However, as we look into disabling replay by default #580, some of our tests fail because the client can't establish a happens-before relationship such that background messages are guaranteed to be delivered.
Looking at the typescript SDK, it starts the request synchronously, immediately after sending 'initialized'.