summaryrefslogtreecommitdiffhomepage
path: root/tests/test_transport.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2016-06-10 14:03:58 -0700
committerJeff Forcier <jeff@bitprophet.org>2016-06-10 14:03:58 -0700
commit50de173becde7446fc725422bbf2f8aa3b2708da (patch)
tree524aacf02d4517f6674a6a6a55cfcf47fb78a5f6 /tests/test_transport.py
parent632b92c78dc1bf8e4a8b5875e0adcb511117dcc2 (diff)
parentda125c13a09bac42f5565ac24e6ed454629d9aa8 (diff)
Merge branch '1.17' into 2.0
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r--tests/test_transport.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 5069e5b0..d81ad8f3 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -828,3 +828,21 @@ class TransportTest(unittest.TestCase):
hostkey=public_host_key,
username='slowdive',
password='pygmalion')
+
+ def test_M_select_after_close(self):
+ """
+ verify that select works when a channel is already closed.
+ """
+ self.setup_test_server()
+ chan = self.tc.open_session()
+ chan.invoke_shell()
+ schan = self.ts.accept(1.0)
+ schan.close()
+
+ # give client a moment to receive close notification
+ time.sleep(0.1)
+
+ r, w, e = select.select([chan], [], [], 0.1)
+ self.assertEqual([chan], r)
+ self.assertEqual([], w)
+ self.assertEqual([], e)