diff options
author | Simon Percivall <simon.percivall@trioptima.com> | 2014-04-15 11:17:24 +0200 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-08-25 23:03:23 -0700 |
commit | adaf8a2c36bf37aa98c347874316ef1809dc40a3 (patch) | |
tree | 75d7129650608fbc6291be215a31415e8c1b702b | |
parent | 118d581f92b1aa49a482c68faa73df0c8967b3c4 (diff) |
Set Transport.active to False early in Transport.__init__.
-rw-r--r-- | paramiko/transport.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index 1471b543..d904da1d 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -164,6 +164,8 @@ class Transport (threading.Thread): :param socket sock: a socket or socket-like object to create the session over. """ + self.active = False + if isinstance(sock, string_types): # convert "host:port" into (host, port) hl = sock.split(':', 1) @@ -220,7 +222,6 @@ class Transport (threading.Thread): self.H = None self.K = None - self.active = False self.initial_kex_done = False self.in_kex = False self.authenticated = False |