1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-08 21:18:00 +03:00

fixed tunnel timeout check BEFORE transport connected

This commit is contained in:
Adolfo Gómez García 2023-05-12 15:39:25 +02:00
parent ba28ab78ed
commit ddf07eb68b
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -208,7 +208,10 @@ class TunnelProtocol(asyncio.Protocol):
try:
await asyncio.sleep(wait)
logger.error('TIMEOUT FROM %s', self.pretty_source())
self.transport.write(consts.RESPONSE_ERROR_TIMEOUT)
try:
self.transport.write(consts.RESPONSE_ERROR_TIMEOUT)
except Exception: # nosec: Transport not available, ignore
pass
self.close_connection()
except asyncio.CancelledError:
pass