Skip to content

m_subscriptions is not cleaned up when closing a session #39

Description

@reddwarf69

I would have expected m_subscriptions to have been cleaned up by the time I get the closed_future.
Not sure if this could be a more serious issue (can the session be reopened and have old sessions? could it be considered a memory leak?). But for me it's an issue because my on_event_fn (indirectly) contains a reference to my wamp_session shared_ptr. So if I don't make sure to UNSUBSCRIBE all the subscriptions before closing the wamp_session the std::shared_ptr<wamp_session> reference counter never reaches zero and wamp_session is never destroyed.

Edit: Actually AFAICS the subscription in only removed from m_subscriptions in process_inbound_unsubscribed(). So I depend on my peer behaving and sending me the reply. If the connection dies for some reason and I can't get the UNSUBSCRIBED message back I'm out of luck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions