fix(rt): prevent fallback reactor thread from being created accidentally
Switches from `Handle::current()` to `Handle::default()`.
This commit is contained in:
		| @@ -125,7 +125,7 @@ impl Server<AddrIncoming, ()> { | ||||
|  | ||||
|     /// Create a new instance from a `std::net::TcpListener` instance. | ||||
|     pub fn from_tcp(listener: StdTcpListener) -> Result<Builder<AddrIncoming>, ::Error> { | ||||
|         let handle = tokio_reactor::Handle::current(); | ||||
|         let handle = tokio_reactor::Handle::default(); | ||||
|         AddrIncoming::from_std(listener, &handle) | ||||
|             .map(Server::builder) | ||||
|     } | ||||
|   | ||||
| @@ -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) | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user