@@ -273,7 +273,7 @@ async def restore(self):
273273class Server (events .AbstractServer ):
274274
275275 def __init__ (self , loop , sockets , protocol_factory , ssl_context , backlog ,
276- ssl_handshake_timeout , ssl_shutdown_timeout = None ):
276+ ssl_handshake_timeout ):
277277 self ._loop = loop
278278 self ._sockets = sockets
279279 self ._active_count = 0
@@ -282,7 +282,6 @@ def __init__(self, loop, sockets, protocol_factory, ssl_context, backlog,
282282 self ._backlog = backlog
283283 self ._ssl_context = ssl_context
284284 self ._ssl_handshake_timeout = ssl_handshake_timeout
285- self ._ssl_shutdown_timeout = ssl_shutdown_timeout
286285 self ._serving = False
287286 self ._serving_forever_fut = None
288287
@@ -314,8 +313,7 @@ def _start_serving(self):
314313 sock .listen (self ._backlog )
315314 self ._loop ._start_serving (
316315 self ._protocol_factory , sock , self ._ssl_context ,
317- self , self ._backlog , self ._ssl_handshake_timeout ,
318- self ._ssl_shutdown_timeout )
316+ self , self ._backlog , self ._ssl_handshake_timeout )
319317
320318 def get_loop (self ):
321319 return self ._loop
@@ -469,7 +467,6 @@ def _make_ssl_transport(
469467 * , server_side = False , server_hostname = None ,
470468 extra = None , server = None ,
471469 ssl_handshake_timeout = None ,
472- ssl_shutdown_timeout = None ,
473470 call_connection_made = True ):
474471 """Create SSL transport."""
475472 raise NotImplementedError
@@ -972,7 +969,6 @@ async def create_connection(
972969 proto = 0 , flags = 0 , sock = None ,
973970 local_addr = None , server_hostname = None ,
974971 ssl_handshake_timeout = None ,
975- ssl_shutdown_timeout = None ,
976972 happy_eyeballs_delay = None , interleave = None ):
977973 """Connect to a TCP server.
978974
@@ -1008,10 +1004,6 @@ async def create_connection(
10081004 raise ValueError (
10091005 'ssl_handshake_timeout is only meaningful with ssl' )
10101006
1011- if ssl_shutdown_timeout is not None and not ssl :
1012- raise ValueError (
1013- 'ssl_shutdown_timeout is only meaningful with ssl' )
1014-
10151007 if happy_eyeballs_delay is not None and interleave is None :
10161008 # If using happy eyeballs, default to interleave addresses by family
10171009 interleave = 1
@@ -1087,8 +1079,7 @@ async def create_connection(
10871079
10881080 transport , protocol = await self ._create_connection_transport (
10891081 sock , protocol_factory , ssl , server_hostname ,
1090- ssl_handshake_timeout = ssl_handshake_timeout ,
1091- ssl_shutdown_timeout = ssl_shutdown_timeout )
1082+ ssl_handshake_timeout = ssl_handshake_timeout )
10921083 if self ._debug :
10931084 # Get the socket from the transport because SSL transport closes
10941085 # the old socket and creates a new SSL socket
@@ -1100,8 +1091,7 @@ async def create_connection(
11001091 async def _create_connection_transport (
11011092 self , sock , protocol_factory , ssl ,
11021093 server_hostname , server_side = False ,
1103- ssl_handshake_timeout = None ,
1104- ssl_shutdown_timeout = None ):
1094+ ssl_handshake_timeout = None ):
11051095
11061096 sock .setblocking (False )
11071097
@@ -1112,8 +1102,7 @@ async def _create_connection_transport(
11121102 transport = self ._make_ssl_transport (
11131103 sock , protocol , sslcontext , waiter ,
11141104 server_side = server_side , server_hostname = server_hostname ,
1115- ssl_handshake_timeout = ssl_handshake_timeout ,
1116- ssl_shutdown_timeout = ssl_shutdown_timeout )
1105+ ssl_handshake_timeout = ssl_handshake_timeout )
11171106 else :
11181107 transport = self ._make_socket_transport (sock , protocol , waiter )
11191108
@@ -1204,8 +1193,7 @@ async def _sendfile_fallback(self, transp, file, offset, count):
12041193 async def start_tls (self , transport , protocol , sslcontext , * ,
12051194 server_side = False ,
12061195 server_hostname = None ,
1207- ssl_handshake_timeout = None ,
1208- ssl_shutdown_timeout = None ):
1196+ ssl_handshake_timeout = None ):
12091197 """Upgrade transport to TLS.
12101198
12111199 Return a new transport that *protocol* should start using
@@ -1228,7 +1216,6 @@ async def start_tls(self, transport, protocol, sslcontext, *,
12281216 self , protocol , sslcontext , waiter ,
12291217 server_side , server_hostname ,
12301218 ssl_handshake_timeout = ssl_handshake_timeout ,
1231- ssl_shutdown_timeout = ssl_shutdown_timeout ,
12321219 call_connection_made = False )
12331220
12341221 # Pause early so that "ssl_protocol.data_received()" doesn't
@@ -1427,7 +1414,6 @@ async def create_server(
14271414 reuse_address = None ,
14281415 reuse_port = None ,
14291416 ssl_handshake_timeout = None ,
1430- ssl_shutdown_timeout = None ,
14311417 start_serving = True ):
14321418 """Create a TCP server.
14331419
@@ -1451,10 +1437,6 @@ async def create_server(
14511437 raise ValueError (
14521438 'ssl_handshake_timeout is only meaningful with ssl' )
14531439
1454- if ssl_shutdown_timeout is not None and ssl is None :
1455- raise ValueError (
1456- 'ssl_shutdown_timeout is only meaningful with ssl' )
1457-
14581440 if host is not None or port is not None :
14591441 if sock is not None :
14601442 raise ValueError (
@@ -1527,8 +1509,7 @@ async def create_server(
15271509 sock .setblocking (False )
15281510
15291511 server = Server (self , sockets , protocol_factory ,
1530- ssl , backlog , ssl_handshake_timeout ,
1531- ssl_shutdown_timeout )
1512+ ssl , backlog , ssl_handshake_timeout )
15321513 if start_serving :
15331514 server ._start_serving ()
15341515 # Skip one loop iteration so that all 'loop.add_reader'
@@ -1542,23 +1523,17 @@ async def create_server(
15421523 async def connect_accepted_socket (
15431524 self , protocol_factory , sock ,
15441525 * , ssl = None ,
1545- ssl_handshake_timeout = None ,
1546- ssl_shutdown_timeout = None ):
1526+ ssl_handshake_timeout = None ):
15471527 if sock .type != socket .SOCK_STREAM :
15481528 raise ValueError (f'A Stream Socket was expected, got { sock !r} ' )
15491529
15501530 if ssl_handshake_timeout is not None and not ssl :
15511531 raise ValueError (
15521532 'ssl_handshake_timeout is only meaningful with ssl' )
15531533
1554- if ssl_shutdown_timeout is not None and not ssl :
1555- raise ValueError (
1556- 'ssl_shutdown_timeout is only meaningful with ssl' )
1557-
15581534 transport , protocol = await self ._create_connection_transport (
15591535 sock , protocol_factory , ssl , '' , server_side = True ,
1560- ssl_handshake_timeout = ssl_handshake_timeout ,
1561- ssl_shutdown_timeout = ssl_shutdown_timeout )
1536+ ssl_handshake_timeout = ssl_handshake_timeout )
15621537 if self ._debug :
15631538 # Get the socket from the transport because SSL transport closes
15641539 # the old socket and creates a new SSL socket
0 commit comments