Skip to content

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.

1 participant