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
I'm not seeing a good mechanism here to disconnect a consumer manually.
My use-case is this: a client will make a POST /some-route which kicks off a back-end service and allows other clients to watch for SSE on GET /events and I'm simply forwarding all output from the back-end service to the clients via es.SendMessage. I would like to close the SSE connections on those clients when the back-end service is finished.
Do you have any ideas?
Thanks!
The text was updated successfully, but these errors were encountered:
"Hard" disconnecting should be used in exceptional cases (network error, killed process, etc).
I think in your use-case you can notify consumers (via SSE message) about the back-end service is stopping. So a consumer can disconnect itself.
Thanks so much. That's what I have been doing, but it felt wrong for some reason. I do see that the W3 spec doesn't have much to say about server-side intentional disconnects. I'll keep using what I have been -- thanks!
On Tuesday, April 2, 2013 at 2:10 AM, Anton Ageev wrote:
"Hard" disconnecting should be used in exceptional cases (network error, killed process, etc).
I think in your use-case you can notify consumers (via SSE message) about the back-end service is stopping. So a consumer can disconnect itself.
—
Reply to this email directly or view it on GitHub (#6 (comment)).
I'm not seeing a good mechanism here to disconnect a consumer manually.
My use-case is this: a client will make a
POST /some-route
which kicks off a back-end service and allows other clients to watch for SSE onGET /events
and I'm simply forwarding all output from the back-end service to the clients viaes.SendMessage
. I would like to close the SSE connections on those clients when the back-end service is finished.Do you have any ideas?
Thanks!
The text was updated successfully, but these errors were encountered: