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 ## Unreleased - 2021-xx-xx
* Hidden `ServerBuilder::start` method has been removed. Use `ServerBuilder::run`. [#246] * 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 [#246]: https://github.com/actix/actix-net/pull/246

View File

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