diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs index fecf856c57..c82866621c 100644 --- a/src/client/connect/http.rs +++ b/src/client/connect/http.rs @@ -502,7 +502,7 @@ fn connect(addr: &SocketAddr, local_addr: &Option, handle: &Option Cow::Borrowed(handle), - None => Cow::Owned(Handle::current()), + None => Cow::Owned(Handle::default()), }; Ok(TcpStream::connect_std(builder.to_tcp_stream()?, addr, &handle)) diff --git a/src/server/mod.rs b/src/server/mod.rs index 01cf071349..99a83b8104 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -125,7 +125,7 @@ impl Server { /// Create a new instance from a `std::net::TcpListener` instance. pub fn from_tcp(listener: StdTcpListener) -> Result, ::Error> { - let handle = tokio_reactor::Handle::current(); + let handle = tokio_reactor::Handle::default(); AddrIncoming::from_std(listener, &handle) .map(Server::builder) } diff --git a/src/server/tcp.rs b/src/server/tcp.rs index 4961311eba..efab9619bc 100644 --- a/src/server/tcp.rs +++ b/src/server/tcp.rs @@ -29,7 +29,7 @@ impl AddrIncoming { if let Some(handle) = handle { AddrIncoming::from_std(std_listener, handle) } else { - let handle = Handle::current(); + let handle = Handle::default(); AddrIncoming::from_std(std_listener, &handle) } }