Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Remove listener when mongos destroyed #257

Merged
merged 4 commits into from
Dec 13, 2017
Merged

Remove listener when mongos destroyed #257

merged 4 commits into from
Dec 13, 2017

Conversation

jlord
Copy link

@jlord jlord commented Dec 12, 2017

Not all of the listeners were being removed when a server was closed, causing a memory leak on reconnect.

This removes the serverDescriptionChanged listener when a server has been closed.

NODE-1216


const test = new MongosFixture();

describe.only('EventEmitters (Mongos)', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the only

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 👍 not quite ready for review yet :)

@jlord jlord changed the title [WIP] Remove all listeners when mongos destroyed Remove all listeners when mongos destroyed Dec 12, 2017
@jlord jlord changed the title Remove all listeners when mongos destroyed Remove listener when mongos destroyed Dec 12, 2017
@mbroadst
Copy link
Member

nice!

@jlord jlord merged commit 243e942 into 3.0.0 Dec 13, 2017
@jlord jlord deleted the mongos-topo branch December 13, 2017 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants