From 6125e462bd65396d823f4a135c730c287564e754 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 9 Jan 2015 11:34:31 -0800 Subject: Fix some tests --- tests/channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/channel.rs b/tests/channel.rs index 420c5bd..5ff1e19 100644 --- a/tests/channel.rs +++ b/tests/channel.rs @@ -67,7 +67,7 @@ fn direct() { let mut l = TcpListener::bind("127.0.0.1:0").unwrap(); let addr = l.socket_name().unwrap(); let mut a = l.listen().unwrap(); - let t = Thread::spawn(move|| { + let t = Thread::scoped(move|| { let mut s = a.accept().unwrap(); let b = &mut [0, 0, 0]; s.read(b).unwrap(); @@ -89,7 +89,7 @@ fn forward() { let (_tcp, sess) = ::authed_session(); let (mut listen, port) = sess.channel_forward_listen(39249, None, None) .unwrap(); - let t = Thread::spawn(move|| { + let t = Thread::scoped(move|| { let mut s = TcpStream::connect(("127.0.0.1", port)).unwrap(); let b = &mut [0, 0, 0]; s.read(b).unwrap(); -- cgit v1.2.3