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

Consolidate stop/disconnect of connections #20

Open
lfse-slafleur opened this issue Jul 26, 2023 · 0 comments
Open

Consolidate stop/disconnect of connections #20

lfse-slafleur opened this issue Jul 26, 2023 · 0 comments

Comments

@lfse-slafleur
Copy link
Member

Right now WebsocketConnection removes its queue from MessageRouter and ModelConnection does not.

This looks weird as I would expect MessageRouter to manage its queues. I would expect, regardless of Connection type that the connection_has_closed function in MessageRouter to be called and that is when the queue should be removed.

A connection may be stopped when a websocket disconnects, a {device,cem} model decides this should be the case or other parts of the code. Regardless of who calls it, all clean up should happen appropiately:

  • Clean up queue in MessageRouter
  • Stop AsyncApplication
  • Delete connection from MessageRouter
  • Disconnect the 'other'/reverse connection
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