Replies: 2 comments 3 replies
-
Hi there! I think for this scenario you could try sending a certain event from the backend immediately as the connection is established. The most reliable way to test the connection is to see whether events are received. In discussion #31 it is outlined how you can create a Let me know if this helps and suits your use case! |
Beta Was this translation helpful? Give feedback.
-
Hmm, sort-of a ping message sent by the server that the client uses to confirm the connection is re-established. Its feels a bit like a hack as I'd expect that go-sse client would know the connection is re-established but maybe its not that simple (is it ever?). I will give your suggestion a try. |
Beta Was this translation helpful? Give feedback.
-
I'm creating a client like this:
The callback is used to update the end-user that the connection was lost and reconnecting is in progress. This all works fine.
However, how to know that the connection has been restored?
Beta Was this translation helpful? Give feedback.
All reactions