diff --git a/kubi-udp/src/client.rs b/kubi-udp/src/client.rs index 55d0917..8707e18 100644 --- a/kubi-udp/src/client.rs +++ b/kubi-udp/src/client.rs @@ -140,8 +140,8 @@ impl Client where S: Encode + Decode, R: Encode + Decode { return Ok(()) }, ServerPacket::Disconnected(reason) => { - //this should never fail but we're handling the error anyway let reason = DisconnectReason::KickedByServer(reason); + //this should never fail but we're handling the error anyway self.disconnect_inner(reason, true)?; return Ok(()) },