Skip to content

Commit

Permalink
changed info! to debug! and a TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousBit0111 committed Nov 1, 2024
1 parent 7ad1bf3 commit ed01a60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/net/src/packets/incoming/keep_alive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::packets::IncomingPacket;
use crate::{NetResult, ServerState};
use ferrumc_macros::{packet, NetDecode};
use std::sync::Arc;
use tracing::info;
use tracing::debug;

#[derive(NetDecode)]
#[packet(packet_id = 0x18, state = "play")]
Expand All @@ -15,10 +15,11 @@ impl IncomingPacket for IncomingKeepAlivePacket {
async fn handle(self, conn_id: usize, state: Arc<ServerState>) -> NetResult<()> {
let mut last_keep_alive = state.universe.get_mut::<KeepAlive>(conn_id)?;
if self.id != last_keep_alive.id {
info!(
debug!(
"Invalid keep alive packet received from {:?} with id {:?} (expected {:?})",
conn_id, self.id, last_keep_alive.id
);
// TODO Kick player
} else {
*last_keep_alive = KeepAlive::from(self.id);
}
Expand Down

0 comments on commit ed01a60

Please sign in to comment.