Skip to content

Commit

Permalink
Fix transport is None error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Jul 1, 2023
1 parent 6f3e7f4 commit 640ad8d
Showing 1 changed file with 3 additions and 0 deletions.
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 @@ 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 640ad8d

Please sign in to comment.