diff options
author | Robey Pointer <robey@lag.net> | 2006-04-28 10:49:59 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2006-04-28 10:49:59 -0700 |
commit | c278de9fd494d25f32b8ad79b4a559bcd7a9ffca (patch) | |
tree | a6c9ca9eccf2904c2c64add41925b53564f91898 | |
parent | 98190872102d9623ffefae0c6dd916ab7dac0bf3 (diff) |
[project @ robey@lag.net-20060428174959-bae73f58ca8ed33a]
patch from nicholas piper to catch keepalives sent to the client
-rw-r--r-- | paramiko/transport.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index d6ee2669..6fe72189 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1686,7 +1686,11 @@ class Transport (threading.Thread): kind = m.get_string() self._log(DEBUG, 'Received global request "%s"' % kind) want_reply = m.get_boolean() - ok = self.server_object.check_global_request(kind, m) + if not self.server_mode: + self._log(DEBUG, 'Rejecting "%s" channel request from server.' % kind) + ok = False + else: + ok = self.server_object.check_global_request(kind, m) extra = () if type(ok) is tuple: extra = ok |