From 831afe79b31494b0ead615909c0553905c831dbb Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 14 Aug 2014 11:01:49 +0200 Subject: [PATCH] Some cleanup of comments --- src/server/portal/telnet.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/server/portal/telnet.py b/src/server/portal/telnet.py index b2c3e6219..56a5110a5 100644 --- a/src/server/portal/telnet.py +++ b/src/server/portal/telnet.py @@ -46,17 +46,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session): # the Server becomes aware of it. self.sessionhandler.connect(self) - # This is a fix to make sure the connection does not - # continue until the handshakes are done. This is a - # dumb delay of 1 second. This solution is not ideal (and - # potentially buggy for slow connections?) but - # adding a callback chain to all protocols (and notably - # to their handshakes, which in some cases are multi-part) - # is not trivial. Without it, the protocol will default - # to their defaults since sessionhandler.connect will sync - # before the handshakes have had time to finish. Keeping this patch - # until coming up with a more elegant solution /Griatch - + # timeout the handshakes in case the client doesn't reply at all from src.utils.utils import delay delay(2, callback=self.handshake_done, retval=True)