Skip to content

Commit

Permalink
Ignore LeaveReq packets during lobby countdown and initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxxu committed Nov 5, 2024
1 parent 9c04608 commit 97c4a69
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/client/src/lan/game/lobby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ impl<'a> LobbyHandler<'a> {
break;
}
} else {
if let LeaveReq::PACKET_TYPE_ID = pkt.type_id() {
tracing::warn!("received leave LeaveReq during lobby count down, ignoring");
continue;
}

return Err(Error::UnexpectedW3GSPacket(pkt));
}
}
Expand Down Expand Up @@ -360,6 +365,9 @@ impl<'a> LobbyHandler<'a> {
}
}
}
LeaveReq::PACKET_TYPE_ID => {
tracing::warn!("received leave request during lobby initialization, ignoring");
}
_ => return Err(Error::UnexpectedW3GSPacket(pkt)),
}
Ok(())
Expand Down

0 comments on commit 97c4a69

Please sign in to comment.