From 54abf85523d266dd69cc5275f0c581ec04984b0d Mon Sep 17 00:00:00 2001 From: John Fleming <31658656+spikefishjohn@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:41:57 -0500 Subject: [PATCH] Update telnet_server.py Maybe use the correct object name this time for the socket objects. --- gns3server/utils/asyncio/telnet_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/utils/asyncio/telnet_server.py b/gns3server/utils/asyncio/telnet_server.py index 14742e00..b8829847 100644 --- a/gns3server/utils/asyncio/telnet_server.py +++ b/gns3server/utils/asyncio/telnet_server.py @@ -192,9 +192,9 @@ class AsyncioTelnetServer: sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) # 60 sec keep alives, close tcp session after 4 missed # Will keep a firewall from aging out telnet console. - writer_sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60) - writer_sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 10) - writer_sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 10) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4) #log.debug("New connection from {}".format(sock.getpeername())) # Keep track of connected clients