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

Connection hangs forever when using connection context manager and there was a disconnect before __exit method is called #436

Open
zem00n opened this issue Aug 29, 2024 · 0 comments

Comments

@zem00n
Copy link

zem00n commented Aug 29, 2024

I am using this library in a method and this method never returns if server/connection died for any reason. Currently I am not using Message Listener reconnect method(on_disconnect calls connect) as I didn't find any examples on how to gracefully disconnect without this reconnection.

stomp.connect.BaseConnection.exit

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.disconnect(self.disconnect_receipt_id)
        self.disconnect_listener.wait_on_receipt()
        self.disconnect_listener.wait_on_disconnected()

Should we check if connection is alive? And probably we don't want to wait forever for a disconnect.

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

1 participant