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>
  • Loading branch information
Dreamsorcerer and webknjaz committed Jul 9, 2023
1 parent 1805758 commit 3a54d37
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 @@ -1063,6 +1063,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 3a54d37

Please sign in to comment.