This commit is contained in:
griffi-gh 2023-02-04 22:27:19 +01:00
parent c1f1ec028f
commit 53fc7dcd27

View file

@ -140,8 +140,8 @@ impl<S, R> Client<S, R> where S: Encode + Decode, R: Encode + Decode {
return Ok(()) return Ok(())
}, },
ServerPacket::Disconnected(reason) => { ServerPacket::Disconnected(reason) => {
//this should never fail but we're handling the error anyway
let reason = DisconnectReason::KickedByServer(reason); let reason = DisconnectReason::KickedByServer(reason);
//this should never fail but we're handling the error anyway
self.disconnect_inner(reason, true)?; self.disconnect_inner(reason, true)?;
return Ok(()) return Ok(())
}, },