1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-07-04 22:02:39 +00:00

Looks like even with a 30 second timeout you can still get no data. Change flow control from break to continue to keep main loop runnning.

This commit is contained in:
John Fleming 2024-01-31 02:44:20 -05:00
parent be82ac869b
commit bae8aee211

View File

@ -59,8 +59,8 @@ class SFTelnetProxyMuxer:
# Set a timeout for the read operation, without should() the socket closes after timeout. # Set a timeout for the read operation, without should() the socket closes after timeout.
data = await asyncio.shield(asyncio.wait_for(reader.read((4*1024*1024)), timeout=self.heartbeattimer)) data = await asyncio.shield(asyncio.wait_for(reader.read((4*1024*1024)), timeout=self.heartbeattimer))
if not data: if not data:
log.debug(f"No data. Not sure if this is possible.") log.debug(f"No data from socket read, start over read loop.")
break continue
if reader.at_eof(): if reader.at_eof():
log.info(f"Client {client_info} closed tcp session with eof.") log.info(f"Client {client_info} closed tcp session with eof.")
writer.close() writer.close()