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

Fix TLS transport is None error #7333

Merged
merged 3 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/3355.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a transport is :data:`None` error -- by :user:`Dreamsorcerer`.
3 changes: 3 additions & 0 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@
f"[{type_err!s}]"
) from type_err
else:
if tls_transport is None:
msg = "Failed to start TLS (possibly caused by closing transport)"
raise client_error(req.connection_key, OSError(msg))

Check warning on line 1067 in aiohttp/connector.py

View check run for this annotation

Codecov / codecov/patch

aiohttp/connector.py#L1067

Added line #L1067 was not covered by tests
tls_proto.connection_made(
tls_transport
) # Kick the state machine of the new TLS protocol
Expand Down