diff options
author | Robey Pointer <robey@lag.net> | 2006-04-12 13:36:12 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2006-04-12 13:36:12 -0700 |
commit | 6e2f3b6548f0d42582906b869760e91f0045d20b (patch) | |
tree | dc321e8b37f9655527d071020cda215e5474c2cf | |
parent | 37dd98bc611e6006ee8403759e2d81c34e239e43 (diff) |
[project @ robey@lag.net-20060412203612-863c46529730f786]
bump up the default banner timeout to 15 seconds and make it configurable via (undocumented) Transport.banner_timeout
-rw-r--r-- | paramiko/transport.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index 59051782..d6ee2669 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -287,7 +287,8 @@ class Transport (threading.Thread): self.auth_handler = None self.global_response = None # response Message from an arbitrary global request self.completion_event = None # user-defined event callbacks - + self.banner_timeout = 15 # how long (seconds) to wait for the SSH banner + # server mode: self.server_mode = False self.server_object = None @@ -1411,9 +1412,10 @@ class Transport (threading.Thread): def _check_banner(self): # this is slow, but we only have to do it once for i in range(5): - # give them 5 seconds for the first line, then just 2 seconds each additional line + # give them 15 seconds for the first line, then just 2 seconds + # each additional line. (some sites have very high latency.) if i == 0: - timeout = 5 + timeout = self.banner_timeout else: timeout = 2 try: |