diff --git a/paramiko/client.py b/paramiko/client.py index 594bba8..c809e4b 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -294,6 +294,8 @@ class SSHClient (object): """ Close this SSHClient and its underlying L{Transport}. """ + if self._transport is None: + return self._transport.close() self._transport = None