-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Extracted from code review comment:
Using new Date().getTime() for Server-Sent Event (SSE) IDs is not guaranteed to produce unique IDs, especially if multiple events are generated within the same millisecond. This could lead to issues with clients that rely on unique event IDs. According to the SSE specification, the id field should uniquely identify the event, which is crucial for features like resuming connections.
A more robust approach would be to use a counter initialized before the try block (e.g., let eventId = 0;) and increment it for each event. This change should also be applied on line 63.
Originally posted by @gemini-code-assist[bot] in #162 (comment)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed