summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierce Lopez <pierce.lopez@gmail.com>2017-05-04 10:12:24 -0400
committerPierce Lopez <pierce.lopez@gmail.com>2017-06-06 17:03:44 -0400
commitf7546a25318033c16edad5d586204832048db764 (patch)
tree708ba28ef765bf7726294310eb74c30a340d541d
parent81e28fb2fa4bfeff96b69b32620739cc2e9aa45d (diff)
downloadparamiko-f7546a25318033c16edad5d586204832048db764.tar.gz
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.py1
-rw-r--r--paramiko/transport.py5
2 files changed, 0 insertions, 6 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index 0c2941e5..9612e165 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -335,7 +335,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 21565673..1de6ff09 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -281,7 +281,6 @@ class Transport (threading.Thread, ClosingContextManager):
arguments.
"""
self.active = False
- self._sshclient = None
if isinstance(sock, string_types):
# convert "host:port" into (host, port)
@@ -637,9 +636,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.
@@ -650,7 +646,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):
"""