Skip to content

Commit

Permalink
Merge pull request #180 from NethermindEth/fix/double-mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
varex83 authored Oct 27, 2023
2 parents 0eee000 + 79b8e38 commit 62db8aa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions api/src/rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl RateLimiter {
fn purge(&self) -> Result<()> {
let now = timestamp();

let last_purge = self
let mut last_purge = self
.last_purge
.lock()
.map_err(|_| ApiError::MutexUnlockError)?;
Expand All @@ -98,11 +98,6 @@ impl RateLimiter {

self.call_queue.clear();

let mut last_purge = self
.last_purge
.lock()
.map_err(|_| ApiError::MutexUnlockError)?;

*last_purge = now;
}

Expand Down

0 comments on commit 62db8aa

Please sign in to comment.