Skip to content

Consolidate stop/disconnect of connections #20

Description

@lfse-slafleur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions