Skip to content

Commit

Permalink
Fix transport is None error (#7333)
Browse files Browse the repository at this point in the history
Co-authored-by: Sviatoslav Sydorenko <sviat@redhat.com>
(cherry picked from commit 3a54d37)
  • Loading branch information
Dreamsorcerer authored and patchback[bot] committed Jul 9, 2023
1 parent 6536cb5 commit d66ae93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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 @@ -1130,6 +1130,9 @@ async def _start_tls_connection(
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))
tls_proto.connection_made(
tls_transport
) # Kick the state machine of the new TLS protocol
Expand Down

0 comments on commit d66ae93

Please sign in to comment.