diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-10-05 09:56:23 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-10-05 09:56:23 -0700 |
commit | 17dfa4b2359e62f760585719d3f75781bfa09794 (patch) | |
tree | 7729e725ecabd991aca56161a108fd7da92e4ce7 /tests | |
parent | fa02083388b5a63f7dd0781c667c6a98f29d48a4 (diff) | |
download | ssh2-rs-17dfa4b2359e62f760585719d3f75781bfa09794.zip |
Don't wait for a thread that will probably never finish
Diffstat (limited to 'tests')
-rw-r--r-- | tests/channel.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/channel.rs b/tests/channel.rs index 33292b4..16f37d3 100644 --- a/tests/channel.rs +++ b/tests/channel.rs @@ -55,6 +55,7 @@ fn shell() { let mut channel = sess.channel_session().unwrap(); channel.request_pty("xterm", None, None).unwrap(); channel.shell().unwrap(); + channel.close().unwrap(); } #[test] @@ -115,14 +116,12 @@ fn drop_nonblocking() { let (_tcp, sess) = ::authed_session(); sess.set_blocking(false); - let t = thread::spawn(move || { + thread::spawn(move || { let _s = listener.accept().unwrap(); }); let _ = sess.channel_direct_tcpip("127.0.0.1", addr.port(), None); drop(sess); - - t.join().unwrap(); } const LIBSSH2_ERROR_EAGAIN: i32 = -37; // from libssh2-sys |