diff --git a/paramiko/transport.py b/paramiko/transport.py index b03e007..f8a5236 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -889,6 +889,10 @@ class BaseTransport (threading.Thread): while len(out) > 0: try: n = self.sock.send(out) + except socket.timeout: + n = 0 + if not self.active: + n = -1 except Exception, x: # could be: (32, 'Broken pipe') n = -1