Skip to content

Conversation

@guillaume-sncfconnect
Copy link
Contributor

  • Add a watchdog and a retry mechanism if SSE detected a lost pings
  • Fix the message display for stream's messages with multiple chunks when fallback from SSE to HTTP


private tryOpen(url: string, resolve: () => void, reject: () => void) {
this.eventSource = new EventSource(url);
private tryOpen( resolve?: () => void, reject?: () => void) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you run lint on updated files?

});

// If the message is new, add it to the messages
// We can have multiple messages with the same responseId, but we only want to add the last one (chunks when streaming is disabled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only if TOCK_STREAM_RESPONSE is enabled on this response!

}

// Set a watchdog timeout to trigger a retry if the server is not responding
private scheduleRetryWatchdog({reason}: {reason: string}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it useful to have named parameters for a private method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants