diff options
author | Pierce Lopez <pierce.lopez@gmail.com> | 2017-05-04 10:12:24 -0400 |
---|---|---|
committer | Pierce Lopez <pierce.lopez@gmail.com> | 2017-06-02 03:15:24 -0400 |
commit | 60f40bb42ef11450599dc1bf8d54016991812811 (patch) | |
tree | c6803ac8d2eefdcc467cae66beb3c48e3ea390f4 | |
parent | a811ed36e1d90e67df6edb5cbe27642d4afae268 (diff) |
remove back-reference from Transport to SSHClient
It was only recently added, and it's not really needed after the
ResourceManager removal. Removing it allows the SSHClient to be
garbage-collected if only the Transport (and Channels) are still
in use.
-rw-r--r-- | paramiko/client.py | 1 | ||||
-rw-r--r-- | paramiko/transport.py | 5 |
2 files changed, 0 insertions, 6 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index 025cf96c..d947e1bc 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -339,7 +339,6 @@ class SSHClient (ClosingContextManager): if banner_timeout is not None: t.banner_timeout = banner_timeout t.start_client() - t.set_sshclient(self) server_key = t.get_remote_server_key() keytype = server_key.get_name() diff --git a/paramiko/transport.py b/paramiko/transport.py index 96bd4a07..a5fcd047 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -285,7 +285,6 @@ class Transport (threading.Thread, ClosingContextManager): arguments. """ self.active = False - self._sshclient = None if isinstance(sock, string_types): # convert "host:port" into (host, port) @@ -651,9 +650,6 @@ class Transport (threading.Thread, ClosingContextManager): Transport._modulus_pack = None return False - def set_sshclient(self, sshclient): - self._sshclient = sshclient - def close(self): """ Close this session, and any open channels that are tied to it. @@ -664,7 +660,6 @@ class Transport (threading.Thread, ClosingContextManager): for chan in list(self._channels.values()): chan._unlink() self.sock.close() - self._sshclient = None def get_remote_server_key(self): """ |