diff --git a/examples/benchmark.rs b/examples/benchmark.rs index 4ccff15..90a36d8 100644 --- a/examples/benchmark.rs +++ b/examples/benchmark.rs @@ -108,7 +108,13 @@ fn main() { let mut processed = 0; while !CLIENT_DONE.load(Ordering::SeqCst) { let timestamp = Instant::now(); - iface.poll(&mut sockets, timestamp).expect("poll error"); + match iface.poll(&mut sockets, timestamp) { + Ok(_) => {}, + Err(e) => { + debug!("poll error: {}",e); + } + } + // tcp:1234: emit data { diff --git a/examples/httpclient.rs b/examples/httpclient.rs index b007d44..7ac9ef7 100644 --- a/examples/httpclient.rs +++ b/examples/httpclient.rs @@ -66,7 +66,12 @@ fn main() { loop { let timestamp = Instant::now(); - iface.poll(&mut sockets, timestamp).expect("poll error"); + match iface.poll(&mut sockets, timestamp) { + Ok(_) => {}, + Err(e) => { + debug!("poll error: {}",e); + } + } { let mut socket = sockets.get::(tcp_handle); diff --git a/examples/ping.rs b/examples/ping.rs index 8f76bf9..4788326 100644 --- a/examples/ping.rs +++ b/examples/ping.rs @@ -121,7 +121,13 @@ fn main() { let ident = 0x22b; loop { - iface.poll(&mut sockets, Instant::now()).unwrap(); + let timestamp = Instant::now(); + match iface.poll(&mut sockets, timestamp) { + Ok(_) => {}, + Err(e) => { + debug!("poll error: {}",e); + } + } { let timestamp = Instant::now();