Fix PollEvented
During the internal refactor to use the `tokio` crate,
`PollEvented::new` stopped using the specified `&Handle`. This resulted
in the `PollEvented` instance being registered with the fallback
reactor.
This patch fixes `PollEvented::new` to use the specified reactor.
Fixes #307
diff --git a/src/reactor/poll_evented.rs b/src/reactor/poll_evented.rs
index 3c5c359..f8019ae 100644
--- a/src/reactor/poll_evented.rs
+++ b/src/reactor/poll_evented.rs
@@ -88,7 +88,7 @@
/// when it's ready.
pub fn new(io: E, handle: &Handle) -> io::Result<PollEvented<E>> {
let registration = Registration::new();
- registration.register(&io)?;
+ registration.register_with(&io, handle.new_tokio_handle())?;
Ok(PollEvented {
io: io,