summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-10-05 09:56:23 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-10-05 09:56:23 -0700
commit17dfa4b2359e62f760585719d3f75781bfa09794 (patch)
tree7729e725ecabd991aca56161a108fd7da92e4ce7 /tests
parentfa02083388b5a63f7dd0781c667c6a98f29d48a4 (diff)
downloadssh2-rs-17dfa4b2359e62f760585719d3f75781bfa09794.zip
Don't wait for a thread that will probably never finish
Diffstat (limited to 'tests')
-rw-r--r--tests/channel.rs5
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