Merged
Conversation
added 2 commits
August 22, 2015 19:54
The invariant should be: a transport is either in the free list (_conns) or in the active list (_acquired). This fixes a bug that put every newly created connection in both lists
Issues aio-libs#253 and aio-libs#254 implemented a `_conns` key evince logic in the function that actually **adds** items to `_conns` Issue aio-libs#406 tweaked this logic even more, making early and eviction of reusable items in the pool possible. Here we put the key eviction logic where it belongs: in the method that **removes** items from the `_conns` pool.
Member
|
Nice found! But can we have any test to prove that this wouldn't be broken in future? |
added 2 commits
August 23, 2015 00:41
Previously, on error we would call the `.close()` method on the response object. This actually releases the connection instead of closing it, thus making it available again in the pool. By passing the `force=True` arg, we make sure the connection is not put back in the pool.
Contributor
Author
|
I did add a specific test and fixed a few existing bous ones, let's see what the buildbots say |
One branch in the `_get` logic did not drop the key as expected.
Contributor
Author
|
I am testing this in staging now and solves all the that came out upgrading from 0.14.x to 0.17.2 |
|
+1, this fixes certain requests consistently timing out in my application starting with aiohttp 0.17.0. |
Member
|
+1, those ServerDisconnectedError exceptions are very annoying |
Member
|
Thanks! i'll test changes and then will do new bug fix release |
Contributor
Author
|
You are welcome! I've tested this on staging for a week now and it works all right |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes weirdness introduced in #254 and #254 and later in #406 .
Supersedes #471
See commit messages for more details