Add some cleanup steps to prevent unclean reactor

This commit is contained in:
Tehom 2018-10-16 20:33:12 -04:00
parent fe969111ce
commit 40a37e501f
2 changed files with 15 additions and 3 deletions

View file

@ -84,7 +84,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
from evennia.utils.utils import delay
# timeout the handshakes in case the client doesn't reply at all
delay(2, callback=self.handshake_done, timeout=True)
self._handshake_delay = delay(2, callback=self.handshake_done, timeout=True)
# TCP/IP keepalive watches for dead links
self.transport.setTcpKeepAlive(1)