Log and print poll errors instead of crashing the server

Closes: #228
Approved by: dlrobertson
This commit is contained in:
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; let mut tcp_6970_active = false;
loop { loop {
let timestamp = Instant::now(); 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" // udp:6969: respond "hello"
{ {