From 640ad8dd995c480080868f62be1e4f012d4f07f1 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 1 Jul 2023 14:33:50 +0100 Subject: [PATCH 1/3] Fix transport is None error --- aiohttp/connector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aiohttp/connector.py b/aiohttp/connector.py index 959a81c47a4..b05e688fb25 100644 --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -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 From 7ebbe2bdc20b49b2f42130465641dc148c96e9fa Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 1 Jul 2023 14:37:10 +0100 Subject: [PATCH 2/3] Create 3355.bugfix --- CHANGES/3355.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGES/3355.bugfix diff --git a/CHANGES/3355.bugfix b/CHANGES/3355.bugfix new file mode 100644 index 00000000000..f71e1de6517 --- /dev/null +++ b/CHANGES/3355.bugfix @@ -0,0 +1 @@ +Fixed a transport is ``None`` error. -- by :user:`Dreamsorcerer` From ecda52297a9ea4a1fcb26fc42dde2f4feda9febf Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 9 Jul 2023 02:19:32 +0200 Subject: [PATCH 3/3] Mark `None` in the change note as data --- CHANGES/3355.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES/3355.bugfix b/CHANGES/3355.bugfix index f71e1de6517..fd002cb00df 100644 --- a/CHANGES/3355.bugfix +++ b/CHANGES/3355.bugfix @@ -1 +1 @@ -Fixed a transport is ``None`` error. -- by :user:`Dreamsorcerer` +Fixed a transport is :data:`None` error -- by :user:`Dreamsorcerer`.