Skip to content
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

Unsubscribe from single subsocket? #262

Open
thw0rted opened this issue Aug 26, 2020 · 4 comments
Open

Unsubscribe from single subsocket? #262

thw0rted opened this issue Aug 26, 2020 · 4 comments

Comments

@thw0rted
Copy link

In the docs, the unsubscribe method is a top level function that, as far as I can tell, closes all known connections to all servers at once. I don't see any method on AtmosphereRequest ("subsocket" in the example) that would allow me to stop the subscription for a single topic. Is this not possible?

@ronnybremer
Copy link

You can call unsubscribeUrl() and pass in the URL you connected to. If they are separate for each socket, it only closes that one socket.

@thw0rted
Copy link
Author

thw0rted commented Dec 2, 2021

Thanks Ronny. Is that method described anywhere in the docs? I don't see it but maybe I'm looking in the wrong place.

@ronnybremer
Copy link

To be honest, I am not sure. I was debugging an issue in our code where two sockets are used on the same page and discovered that call inside of the JS file. It seems to work and is public, so I hope its an official API...

@jfarcand
Copy link
Member

jfarcand commented Dec 2, 2021

Yes it is. The documentation needs to be updated....unfortunately I don't have time those days, but if you have the cycle, I can review and merge :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants