Skip to content

Commit

Permalink
update timestamp on receiving a message
Browse files Browse the repository at this point in the history
  • Loading branch information
muhamadazmy committed Dec 12, 2023
1 parent 8dfffd8 commit 300264d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/peer/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ async fn retainer<S: Signer>(
}
};

ts.store(timestamp(), Ordering::Relaxed);

if message.is_pong() {
ts.store(timestamp(), Ordering::Relaxed);
log::debug!("received a pong");
continue;
}
Expand Down

0 comments on commit 300264d

Please sign in to comment.