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

removeAllSessions() to clean up connection. #33

Merged
merged 2 commits into from
Mar 18, 2019

Conversation

ShivangiReja
Copy link
Contributor

This PR adds a new function removeAllSessions() that calls remove_all_sessions() method of rhea that calls on the connection to clear the internal map for sessions.

Reference : amqp/rhea#207

cc @AlexGhiondea @ramya-rao-a

lib/connection.ts Outdated Show resolved Hide resolved
@ramya-rao-a
Copy link
Collaborator

@amarzavery FYI

@amarzavery
Copy link
Collaborator

amarzavery commented Mar 18, 2019

The PR LGTM.

A side comment: The Connection class has a method to createSession(). rhea-promise does not maintain an internal map of rhea-promise session objects created on the rhea-promise connection object. The servicebus or the eventhub sdk or the amqp-common layer that uses rhea-promise usually maintain those session objects. So make sure those sessions are also cleared in the above mentioned libraries whenever they are created.

@AlexGhiondea AlexGhiondea merged commit aa58f32 into amqp:master Mar 18, 2019
@ramya-rao-a
Copy link
Collaborator

Updating the comments on all the remove and closes in this library in #34 along with removing the listeners when close() is called

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

Successfully merging this pull request may close these issues.

4 participants