mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Added NOP keepalive to telnet protocol. Resolves #641.
This commit is contained in:
parent
0a57f3c9a9
commit
6dcc1b80b0
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ from evennia.server.portal.mccp import Mccp, mccp_compress, MCCP
|
|||
from evennia.server.portal.mxp import Mxp, mxp_parse
|
||||
from evennia.utils import utils, ansi, logger
|
||||
|
||||
IAC = chr(255)
|
||||
NOP = chr(241)
|
||||
|
||||
_RE_N = re.compile(r"\{n$")
|
||||
|
|
@ -64,7 +65,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
delay(2, callback=self.handshake_done, retval=True)
|
||||
|
||||
# set up a keep-alive
|
||||
self.keep_alive = LoopingCall(self._write, NOP)
|
||||
self.keep_alive = LoopingCall(self._write, IAC + NOP, now=False)
|
||||
self.keep_alive.start(30)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue