Skip to content

[Bug]: SSE comments cause client to crash #540

@yarolegovich

Description

@yarolegovich

Is your feature request related to a problem? Please describe.

Long-lived connections where events are not sent regularly might be terminated due to inactivity.
It's a common practice to implement SSE keep-alive messages by sending "a comment".
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#examples

This was implemented in Golang SDK, but we got a report about this causing problems with python clients:
a2aproject/a2a-go#99

Describe the solution you'd like

SSE client should be capable of parsing SSE stream which has comments in it. Lines prefixed with a colon should be ignored.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions