diff options
| author | Steven Fackler <[email protected]> | 2016-02-10 09:36:44 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-02-10 09:36:44 -0800 |
| commit | 7540471ce0b4c25ba151655d43b58bd42171c511 (patch) | |
| tree | a08ec37e8e43c72d9e0a25c4584c5728c69a74f1 /openssl/src/ssl/tests/mod.rs | |
| parent | Merge branch 'release-v0.7.5' into release (diff) | |
| parent | Release v0.7.6 (diff) | |
| download | rust-openssl-0.7.6.tar.xz rust-openssl-0.7.6.zip | |
Merge branch 'release-v0.7.6' into releasev0.7.6
Diffstat (limited to 'openssl/src/ssl/tests/mod.rs')
| -rw-r--r-- | openssl/src/ssl/tests/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs index f5a42536..be35d7ef 100644 --- a/openssl/src/ssl/tests/mod.rs +++ b/openssl/src/ssl/tests/mod.rs @@ -9,6 +9,7 @@ use std::net::{TcpStream, TcpListener, SocketAddr}; use std::path::Path; use std::process::{Command, Child, Stdio, ChildStdin}; use std::thread; +use std::time::Duration; use net2::TcpStreamExt; @@ -79,7 +80,7 @@ impl Server { match TcpStream::connect(&addr) { Ok(s) => return (server, s), Err(ref e) if e.kind() == io::ErrorKind::ConnectionRefused => { - thread::sleep_ms(100); + thread::sleep(Duration::from_millis(100)); } Err(e) => panic!("wut: {}", e), } @@ -117,7 +118,7 @@ impl Server { // Need to wait for the UDP socket to get bound in our child process, // but don't currently have a great way to do that so just wait for a // bit. - thread::sleep_ms(100); + thread::sleep(Duration::from_millis(100)); let socket = UdpSocket::bind(next_addr()).unwrap(); socket.connect(&addr).unwrap(); (s, UdpConnected(socket)) |