--- a/rust/hedgewars-server/src/main.rs Sat Apr 13 00:37:35 2019 +0300
+++ b/rust/hedgewars-server/src/main.rs Mon Apr 15 21:22:51 2019 +0300
@@ -68,6 +68,7 @@
if event.readiness() & Ready::readable() == Ready::readable() {
match event.token() {
utils::SERVER_TOKEN => hw_network.accept_client(&poll).unwrap(),
+ utils::TIMER_TOKEN => hw_network.handle_timeout(&poll).unwrap(),
#[cfg(feature = "official-server")]
utils::IO_TOKEN => hw_network.handle_io_result(),
Token(tok) => hw_network.client_readable(&poll, tok).unwrap(),
@@ -75,8 +76,7 @@
}
if event.readiness() & Ready::writable() == Ready::writable() {
match event.token() {
- utils::SERVER_TOKEN => unreachable!(),
- utils::IO_TOKEN => unreachable!(),
+ utils::SERVER_TOKEN | utils::TIMER_TOKEN | utils::IO_TOKEN => unreachable!(),
Token(tok) => hw_network.client_writable(&poll, tok).unwrap(),
}
}