summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-08-23 16:10:35 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-08-23 16:10:35 -0700
commit8b2a02b7a6579407a41a17de35fb2b92d530413a (patch)
treeb2bdc0b7a73d641ac6217eb20b8e7f659f161820
parent8864bdcf30d981e0b30424591ac5fcdb6cafd64d (diff)
parent7b3698064645c2951d5150685096e81244cff0ed (diff)
downloadparamiko-8b2a02b7a6579407a41a17de35fb2b92d530413a.tar.gz
Merge branch 'master' into 1042-int
-rw-r--r--paramiko/transport.py5
-rw-r--r--sites/www/changelog.rst5
-rw-r--r--tasks.py3
3 files changed, 8 insertions, 5 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index bab23fa1..388f60cb 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -1825,8 +1825,6 @@ class Transport(threading.Thread, ClosingContextManager):
continue
elif ptype == MSG_DISCONNECT:
self._parse_disconnect(m)
- self.active = False
- self.packetizer.close()
break
elif ptype == MSG_DEBUG:
self._parse_debug(m)
@@ -1850,8 +1848,7 @@ class Transport(threading.Thread, ClosingContextManager):
self._log(DEBUG, 'Ignoring message for dead channel %d' % chanid) # noqa
else:
self._log(ERROR, 'Channel request for unknown channel %d' % chanid) # noqa
- self.active = False
- self.packetizer.close()
+ break
elif (
self.auth_handler is not None and
ptype in self.auth_handler._handler_table
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 12c8cb03..15bf8ebf 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,11 @@
Changelog
=========
+* :support:`1041` Modify logic around explicit disconnect
+ messages, and unknown-channel situations, so that they rely on centralized
+ shutdown code instead of running their own. This is at worst removing some
+ unnecessary code, and may help with some situations where Paramiko hangs at
+ the end of a session. Thanks to Paul Kapp for the patch.
* :support:`1012` (via :issue:`1016`) Enhance documentation around the new
`SFTP.posix_rename <paramiko.sftp_client.SFTPClient.posix_rename>` method so
it's referenced in the 'standard' ``rename`` method for increased visibility.
diff --git a/tasks.py b/tasks.py
index 42c18bd0..a34fd3ce 100644
--- a/tasks.py
+++ b/tasks.py
@@ -4,6 +4,7 @@ from shutil import rmtree, copytree
from invoke import Collection, task
from invocations.docs import docs, www, sites
from invocations.packaging.release import ns as release_coll, publish
+from invocations.testing import count_errors
# Until we move to spec-based testing
@@ -49,7 +50,7 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False):
# aliasing, defaults etc.
release_coll.tasks['publish'] = release
-ns = Collection(test, coverage, release_coll, docs, www, sites)
+ns = Collection(test, coverage, release_coll, docs, www, sites, count_errors)
ns.configure({
'packaging': {
# NOTE: many of these are also set in kwarg defaults above; but having