Skip to content

Commit eb254dc

Browse files
authored
Simplify this segment of the example quiche-server
1 parent a786762 commit eb254dc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

apps/src/bin/quiche-server.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,10 @@ fn main() {
188188
false => clients.values().filter_map(|c| c.conn.timeout()).min(),
189189
};
190190

191-
let mut poll_res = poll.poll(&mut events, timeout);
192-
while let Err(e) = poll_res.as_ref() {
193-
if e.kind() == std::io::ErrorKind::Interrupted {
194-
trace!("mio poll() call failed, retrying: {e:?}");
195-
poll_res = poll.poll(&mut events, timeout);
196-
} else {
197-
panic!("mio poll() call failed fatally: {e:?}");
191+
while let Err(e) = poll.poll(&mut events, timeout) {
192+
match e.kind() {
193+
std::io::ErrorKind::Interrupted => log::trace!("mio poll() call failed, retrying: {e:?}"),
194+
_ => panic!("mio poll() call failed fatally: {e:?}"),
198195
}
199196
}
200197

0 commit comments

Comments
 (0)