For a brief period of time, a StreamableServerTransport has no streams. Notifications delivered during this gap fall on the floor.
Here is what happens when a client connects to a server using a streamable transport:
- Client sends an initialize request.
- Server creates a session.
- The request completes, ending the POST stream.
- Client sends a GET to create the standalone stream.
Between 3 and 4, the session exists (is on the Server.sessions slice) but has no streams. Sending messages to the session will fail.
Our tests have never observed this because they always create a server before clients connect, and the change notifications from AddTool and the like happen synchronously, when there are no sessions.
But when change notifications are delayed, as in #671, they may fall into the gap, causing an error to display (although processing is not otherwise affected).