Skip to content

Commit

Permalink
Update udp_server.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive authored and Thomasdezeeuw committed Jul 29, 2023
1 parent e523052 commit f20ec94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/udp_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ fn main() -> io::Result<()> {
// Our event loop.
loop {
// Poll to check if we have events waiting for us.
if let Err(ref err) = poll.poll(&mut events, None) {
if let Err(err) = poll.poll(&mut events, None) {
if err.kind() == io::ErrorKind::Interrupted {
continue;
}
println!("Failed to poll for events: {}", err);
break;
return Err(err);
}

// Process each event.
Expand Down Expand Up @@ -83,7 +82,6 @@ fn main() -> io::Result<()> {
}
}
}
Ok(())
}

#[cfg(target_os = "wasi")]
Expand Down

0 comments on commit f20ec94

Please sign in to comment.