Skip to content

Commit

Permalink
pool: remove no longer needed PingTracker::reset
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Dec 11, 2024
1 parent e374601 commit 9df6639
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions crates/nostr-relay-pool/src/relay/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,6 @@ impl InnerRelay {
// If last nonce is NOT 0, check if relay replied
// Return error if relay not replied
if ping.last_nonce() != 0 && !ping.replied() {
// Reset ping status
ping.reset();

// Return error
return Err(Error::NotRepliedToPing);
}

Expand Down
6 changes: 0 additions & 6 deletions crates/nostr-relay-pool/src/relay/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ impl PingTracker {
self.replied.load(Ordering::SeqCst)
}

#[inline]
pub(super) fn reset(&self) {
self.set_last_nonce(0);
self.set_replied(false);
}

#[inline]
pub(super) async fn just_sent(&self) {
let mut sent_at = self.sent_at.write().await;
Expand Down

0 comments on commit 9df6639

Please sign in to comment.