-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 bug with https proxy acquired cleanup #1340 #1450
Conversation
|
||
assert 0 == len(conn._acquired[key]) | ||
|
||
sess.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close
is coroutine, and connector should probably be closed too but not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yield from sess.close()
is enough, session takes ownership of connector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, my mistake.
Current coverage is 98.85% (diff: 100%)@@ master #1450 diff @@
==========================================
Files 30 30
Lines 6963 6973 +10
Methods 0 0
Messages 0 0
Branches 1155 1159 +4
==========================================
+ Hits 6882 6893 +11
Misses 40 40
+ Partials 41 40 -1
|
Please take a look on Windows failed tests |
Tests fails with the message: |
Maybe you do mocking too much or not enough? :) |
1a1b5d8
to
1dc8631
Compare
c2d78cd
to
cde1672
Compare
The problem was with unclosed proxy transport. Now everything is done. |
Perfect! |
What do these changes do?
This pull request fix bug with https proxy acquired cleanup.
When TCPConnector creates a proxy connection, it adds a transport to the acquired and then sends CONNECT request. But after that TCPConnector detach the transport and does not remove them from the acquired. This caused a memory leak when https proxy connection had used.
Are there changes in behavior for the user?
No.
Related issue number
#1340
Checklist
CONTRIBUTORS.txt
CHANGES.rst
#issue_number
format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.