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
How am i supposed to achive that with the current version? I´d expect to be able to return a callback that will be called when the connection is closed to handle such stuff.
The text was updated successfully, but these errors were encountered:
To be more precise, we could use a custom function like so:
functionsignalCb(this: AbortSignal,ev: Event){sub.unsubscribe();// perform unsubscribe from subscribed thingsstream.close();this.removeEventListener("abort",signalCb);// yes, I am scared}request.signal.addEventListener("abort",signalCb,{once: true});
When the client closes the connection, the server maybe has to do something like clearing an interval.
How am i supposed to achive that with the current version? I´d expect to be able to return a callback that will be called when the connection is closed to handle such stuff.
The text was updated successfully, but these errors were encountered: