Log and print error for all examples
This commit is contained in:
parent
276acfb7ef
commit
3e124ef482
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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::<TcpSocket>(tcp_handle);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue