add changelog, use plain match instead of matches! per comment

This commit is contained in:
lishuo 2021-02-04 14:04:33 +08:00
parent 0bfa947d6e
commit 9f968bfb05
2 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,7 @@
## Unreleased - 2021-xx-xx
* Hidden `ServerBuilder::start` method has been removed. Use `ServerBuilder::run`. [#246]
* Add retry for EINTR(`io::Interrupted`) in `Accept`'s poll loop.
[#246]: https://github.com/actix/actix-net/pull/246

View File

@ -162,12 +162,15 @@ impl Accept {
loop {
if let Err(e) = self.poll.poll(&mut events, None) {
if matches!(e.kind(), std::io::ErrorKind::Interrupted) {
match e.kind() {
std::io::ErrorKind::Interrupted => {
continue;
} else {
}
_ => {
panic!("Poll error: {}", e);
}
}
}
for event in events.iter() {
let token = event.token();