From c1b1a7dc7bf17801389ea233de0c6f5f7a746b6a Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Wed, 9 Apr 2025 18:20:01 +0100 Subject: [PATCH 1/2] Remove unnecessary code --- Lib/asyncio/base_events.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index ff63639638c13f..d11af5c7080fba 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1666,9 +1666,6 @@ async def connect_accepted_socket( raise ValueError( 'ssl_shutdown_timeout is only meaningful with ssl') - if sock is not None: - _check_ssl_socket(sock) - transport, protocol = await self._create_connection_transport( sock, protocol_factory, ssl, '', server_side=True, ssl_handshake_timeout=ssl_handshake_timeout, From fd8acbbb594db14df4b0d6e2641e10d5e0d204af Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Thu, 10 Apr 2025 16:16:18 +0100 Subject: [PATCH 2/2] fixup --- Lib/asyncio/base_events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index d11af5c7080fba..7b4e92aed682d5 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1666,6 +1666,8 @@ async def connect_accepted_socket( raise ValueError( 'ssl_shutdown_timeout is only meaningful with ssl') + _check_ssl_socket(sock) + transport, protocol = await self._create_connection_transport( sock, protocol_factory, ssl, '', server_side=True, ssl_handshake_timeout=ssl_handshake_timeout,