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
Am i doing something wrong here?
Edit: also tried setting server.Listener.IgnoreWriteExceptions = false with no success: no exception thrown ever (#457)
It did work for #317; could using a controller/Route make a difference?
The text was updated successfully, but these errors were encountered:
Your ReadAlarms method needs to return for the HTTP context to be closed. That's the very point of the HTTP context: it exists as long as the request is being served.
My advice is to use WebSockets for the type of communications you're aiming at here.
Alternatively, you can use HttpContext's own cancellation token to end your loop:
Note that you don't need to check IsCancellationRequested: just pass the cancellation token along to any async method you call and let EmbedIO take care of any OperationCanceledException caused by the token.
I am sending sse events to my clients;
HTTPContext.onClose should fire if the http connection is closed; however it never does.
Am i doing something wrong here?
Edit: also tried setting server.Listener.IgnoreWriteExceptions = false with no success: no exception thrown ever (#457)
It did work for #317; could using a controller/Route make a difference?
The text was updated successfully, but these errors were encountered: