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

Postpone web task creation to connection establishment #3081

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

asvetlov
Copy link
Member

Fix #3052

@codecov-io
Copy link

Codecov Report

Merging #3081 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3081      +/-   ##
=========================================
- Coverage   98.11%   98.1%   -0.01%     
=========================================
  Files          42      42              
  Lines        7750    7763      +13     
  Branches     1349    1356       +7     
=========================================
+ Hits         7604    7616      +12     
  Misses         51      51              
- Partials       95      96       +1
Impacted Files Coverage Δ
aiohttp/web_protocol.py 91.75% <100%> (+0.02%) ⬆️
aiohttp/client_proto.py 95.67% <0%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b596886...8735f91. Read the comment docs.

@pfreixes
Copy link
Contributor

Umm, but moving the task creation when the connection made is triggered is only delaying a loop iteration the task creation. migth be the SSL triggering this issue just because of the time needed to make the SSL handshake? So, maybe better just consider the case and just cancel the task ?

Or am I missing something ?

@asvetlov
Copy link
Member Author

From my understanding, a protocol instance is created immediately on socket accepting but connection_made is called after SSL handshake. If handshake is not successful the protocol is destroyed by GC without connection_lost call.
Another solution could be dropping the task in __del__ but I'd like to avoid this.

@asvetlov asvetlov merged commit 0bc7d52 into master Jun 18, 2018
@asvetlov asvetlov deleted the postpone-web-task branch June 18, 2018 09:38
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSL with closed connections
3 participants