Log and print poll errors instead of crashing the server

Closes: #228
Approved by: dlrobertson
v0.7.x
Michal Podhradsky 2018-06-05 11:44:53 -07:00 committed by Homu
parent 4d01ee3807
commit 6249f69bd9
1 changed files with 6 additions and 1 deletions

View File

@ -74,7 +74,12 @@ fn main() {
let mut tcp_6970_active = false;
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);
}
}
// udp:6969: respond "hello"
{