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

fix connection full bug #373

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vinllen
Copy link

@vinllen vinllen commented Aug 5, 2019

bugfix of connection full, see #322 and #346 .
Here is a brief of my modification:
liveSockets means unused connections and used connections, unusedSockets means unused connections. However, a connection won't be released even if it's an "unused" connection. So this comparison only restricts the used connections but not the total connections.
So in my understanding, this comparison(len(server.liveSockets)-len(server.unusedSockets) >= poolLimit) can only limit the total connections but not used connections. The right comparison should be: len(server.liveSockets) >= poolLimit && len(server.unusedSockets) == 0
This modification has already been merged and verified in my mgo branch which is used in MongoShake tools.

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.

None yet

1 participant