Don't expose heartbeat to app
This commit is contained in:
parent
e58629c2f1
commit
58795eb87e
4 changed files with 7 additions and 6 deletions
|
@ -26,7 +26,9 @@ pub fn handle_network_input(
|
|||
.into());
|
||||
}
|
||||
let uuid = Uuid::from_slice(message.split_off(message.len() - 16).as_slice())?;
|
||||
to_app.write(InboundPacket(Packet::new(message, uuid)));
|
||||
if !message.is_empty() {
|
||||
to_app.write(InboundPacket(Packet::new(message, uuid)));
|
||||
}
|
||||
if let Some(peer_id) = peer_map.get(&uuid) {
|
||||
let (peer, mut last) = peers.get_mut(*peer_id)?;
|
||||
last.update(&time);
|
||||
|
@ -74,7 +76,7 @@ pub fn heartbeat(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn timeouts(
|
||||
pub fn timeout(
|
||||
peers: Query<(&Peer, &PeerReceiveTiming)>,
|
||||
time: Res<Time>,
|
||||
mut delete: EventWriter<PeerChangeEvent>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue