Some cleanup of comments
This commit is contained in:
parent
bb808174e3
commit
831afe79b3
1 changed files with 1 additions and 11 deletions
|
|
@ -46,17 +46,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
||||||
# the Server becomes aware of it.
|
# the Server becomes aware of it.
|
||||||
self.sessionhandler.connect(self)
|
self.sessionhandler.connect(self)
|
||||||
|
|
||||||
# This is a fix to make sure the connection does not
|
# timeout the handshakes in case the client doesn't reply at all
|
||||||
# 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
|
|
||||||
|
|
||||||
from src.utils.utils import delay
|
from src.utils.utils import delay
|
||||||
delay(2, callback=self.handshake_done, retval=True)
|
delay(2, callback=self.handshake_done, retval=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue