Skip to content

fix connection full bug#373

Open
vinllen wants to merge 2 commits intoglobalsign:masterfrom
vinllen:vinllen_cherrypick_connection_full_bugfix
Open

fix connection full bug#373
vinllen wants to merge 2 commits intoglobalsign:masterfrom
vinllen:vinllen_cherrypick_connection_full_bugfix

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