Skip to content

Commit

Permalink
Fix panic with desync detection and input delay
Browse files Browse the repository at this point in the history
  • Loading branch information
johanhelsing committed Oct 21, 2023
1 parent d94656c commit 4302b64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sessions/p2p_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,9 @@ impl<T: Config> P2PSession<T> {
self.last_sent_checksum_frame + interval as i32
};

if self.sync_layer.last_confirmed_frame() >= frame_to_send {
if frame_to_send <= self.sync_layer.last_confirmed_frame()
&& frame_to_send < self.sync_layer.last_saved_frame()
{
let cell = self
.sync_layer
.saved_state_by_frame(frame_to_send)
Expand Down

0 comments on commit 4302b64

Please sign in to comment.