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

_SSLProtocolTransport is not closing after connection loss #101353

Closed
Dreamsorcerer opened this issue Jan 26, 2023 · 1 comment
Closed

_SSLProtocolTransport is not closing after connection loss #101353

Dreamsorcerer opened this issue Jan 26, 2023 · 1 comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@Dreamsorcerer
Copy link
Contributor

After a connection loss _SSLProtocolTransport.is_closing() continues to return False.

I'm really struggling to get to the bottom of it, but currently it seems like is_closing() should do something like return self._ssl_protocol._transport.is_closing() (except transport is set to None when the connection is lost, so maybe could just check for that instead?).

This is currently causing handlers in aiohttp to not get cancelled correctly (potentially running forever), when an SSL transport is used.

Full details and (aiohttp) reproducer:
aio-libs/aiohttp#7172 (comment)

Plus a workaround that demonstrates that atleast connection_lost() gets called in both cases, resulting in protocol.transport getting set to None:
aio-libs/aiohttp#7180

I'm just trying to figure out if something should be fixed in asyncio, and also whether that PR is possibly the correct way to do this or not. I'm wondering if it is already the correct way to check for this and something is just going wrong in asyncio..

@Dreamsorcerer Dreamsorcerer added the type-bug An unexpected behavior, bug, or error label Jan 26, 2023
@Dreamsorcerer
Copy link
Contributor Author

I'm closing this as a mystery, we've just moved the code to rely on the connection_lost callbacks, which is more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Todo
Development

No branches or pull requests

2 participants