Skip to content

Commit b9514df

Browse files
jclapisltitanb
andauthored
Update crates/signer/src/service.rs
Co-authored-by: ltitanb <163874448+ltitanb@users.noreply.github.com>
1 parent 9bacc9f commit b9514df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/signer/src/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async fn check_jwt_rate_limit(
193193
}
194194

195195
// Rate limit the request
196-
let remaining = state.jwt_auth_fail_timeout - elapsed;
196+
let remaining = state.jwt_auth_fail_timeout.saturating_sub(elapsed);
197197
warn!("Client {client_ip} is rate limited for {remaining:?} more seconds due to JWT auth failures");
198198
return Err(SignerModuleError::RateLimited(remaining.as_secs_f64()));
199199
}

0 commit comments

Comments
 (0)