--- a/rust/hedgewars-server/src/server/network.rs Mon Jun 17 20:55:11 2019 +0200
+++ b/rust/hedgewars-server/src/server/network.rs Wed Jun 19 00:49:45 2019 +0300
@@ -349,14 +349,10 @@
}
fn deregister_client(&mut self, poll: &Poll, id: ClientId) {
- let mut client_exists = false;
if let Some(ref client) = self.clients.get(id) {
poll.deregister(client.socket.inner())
.expect("could not deregister socket");
info!("client {} ({}) removed", client.id, client.peer_addr);
- client_exists = true;
- }
- if client_exists {
self.clients.remove(id);
#[cfg(feature = "official-server")]
self.io.cancel(id);