Expected Behavior
Handle comments in event stream. Do nothing when there is a comment line.
Current Behavior
Throw McpError in ResponseSubscribers class
Log:
McpError: Invalid SSE response. Status code: 200 Line: : keep-alive
Context
I have an MCP server that periodically sends heartbeat packets to the MCP client (using comments way, refer to event_stream_format). In theory, the client should ignore these comments. However, starting from version 0.11.0 and in the main branch, an else branch was added in the ResponseSubscribers class, which causes the client to throw an exception upon receiving comments.
Can we add an else-if branch to skip processing when line.startsWith(":")
to support consuming an event stream that includes comments?