@@ -293,7 +293,7 @@ async def client(addr):
293
293
294
294
new_tr .close ()
295
295
296
- with self .tcp_server (serve ) as srv :
296
+ with self .tcp_server (serve , timeout = self . TIMEOUT ) as srv :
297
297
self .loop .run_until_complete (
298
298
asyncio .wait_for (client (srv .addr ), loop = self .loop , timeout = 10 ))
299
299
@@ -358,7 +358,7 @@ async def client(addr):
358
358
359
359
new_tr .close ()
360
360
361
- with self .tcp_server (serve ) as srv :
361
+ with self .tcp_server (serve , timeout = self . TIMEOUT ) as srv :
362
362
self .loop .run_until_complete (
363
363
asyncio .wait_for (client (srv .addr ),
364
364
loop = self .loop , timeout = self .TIMEOUT ))
@@ -412,7 +412,8 @@ async def main(proto, on_con, on_eof, on_con_lost):
412
412
413
413
new_tr = await self .loop .start_tls (
414
414
tr , proto , server_context ,
415
- server_side = True )
415
+ server_side = True ,
416
+ ssl_handshake_timeout = self .TIMEOUT )
416
417
417
418
await on_eof
418
419
await on_con_lost
@@ -429,7 +430,8 @@ async def run_main():
429
430
lambda : proto , '127.0.0.1' , 0 )
430
431
addr = server .sockets [0 ].getsockname ()
431
432
432
- with self .tcp_client (lambda sock : client (sock , addr )):
433
+ with self .tcp_client (lambda sock : client (sock , addr ),
434
+ timeout = self .TIMEOUT ):
433
435
await asyncio .wait_for (
434
436
main (proto , on_con , on_eof , on_con_lost ),
435
437
loop = self .loop , timeout = self .TIMEOUT )
0 commit comments