summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2021-10-15 19:30:22 -0400
committerJeff Forcier <jeff@bitprophet.org>2021-10-15 19:30:22 -0400
commita598ca14d6451343c69be97e0e1c65eb15c0e607 (patch)
tree158948a15cbfe5e70dec98d13e00bdc643794989
parentff6082608026b618d93c67d68d15fa452eef52a4 (diff)
parenta10fbaeecc7af5db8a72ddc19c4132b40a02f364 (diff)
downloadparamiko-a598ca14d6451343c69be97e0e1c65eb15c0e607.tar.gz
Merge branch '2.7' into 2.8
-rw-r--r--paramiko/client.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index 3d8f2dd4..80c956cd 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -450,11 +450,13 @@ class SSHClient(ClosingContextManager):
"""
Close this SSHClient and its underlying `.Transport`.
+ This should be called anytime you are done using the client object.
+
.. warning::
- Failure to do this may, in some situations, cause your Python
- interpreter to hang at shutdown (often due to race conditions).
- It's good practice to `close` your client objects anytime you're
- done using them, instead of relying on garbage collection.
+ Paramiko registers garbage collection hooks that will try to
+ automatically close connections for you, but this is not presently
+ reliable. Failure to explicitly close your client after use may
+ lead to end-of-process hangs!
"""
if self._transport is None:
return