You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current SSE endpoint implementation (/stream) has a strange feature. There is no response at all until the first event. So, until the first event, clients stay in a "connecting" state. HTTP code is unknown, is connection alive is unknown.
It's very uncomfortable for client implementation, because you need to connect to the stream before making any other request, but you don't know are you connected or not. The workaround is to start ping-pong game, but it's not cool at all.
The fix is easy - just req.write(); req.flush(); after headers.
This is very connected to #57onConnect callback can help with this.
The text was updated successfully, but these errors were encountered:
The current SSE endpoint implementation (/stream) has a strange feature. There is no response at all until the first event. So, until the first event, clients stay in a "connecting" state. HTTP code is unknown, is connection alive is unknown.
It's very uncomfortable for client implementation, because you need to connect to the stream before making any other request, but you don't know are you connected or not. The workaround is to start ping-pong game, but it's not cool at all.
The fix is easy - just
req.write(); req.flush();
after headers.This is very connected to #57
onConnect
callback can help with this.The text was updated successfully, but these errors were encountered: