-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncIterator.return() #130
Comments
The async iterator is available only on subscribe because lambda is stateless so if you want to handle presence you should use |
I managed to get this to work actually... even though lambda is stateless it's possible to call the return handler when a client disconnects by iterating through the subscribers returned from |
@tbehrsin that'd be nice! Thank you. |
By returning subscribers iterated from
I'll submit a PR. |
How do I get AsyncIterator.return() to get called onDisconnect and on unsubscribe? I'm looking through the code and it seems this will get bypassed whenever the web socket is disconnected or a subscription is unsubscribed...
I'm trying to publish a presence event to a room topic whenever a user goes offline, using this code I found on google:
But asyncIterator.return is never called, and so it doesn't invoke my onCancel event to publish.
Would be willing to submit a PR if you can point me in the right direction.
The text was updated successfully, but these errors were encountered: