mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
fix(sender): retry_after duration can be negative
This commit is contained in:
1 parent
f7773760a6
commit
22f9b9b91d
1 file changed
+1
-1
@@ -78,7 +78,7 @@ impl Service {
|
||||
let map = self.remote_health.read();
|
||||
let unix_now = millis_since_unix_epoch();
|
||||
map.get(server_name)
|
||||
.map(|(_, next_retry)| Duration::from_millis((*next_retry).expected_sub(unix_now)))
|
||||
.map(|(_, next_retry)| Duration::from_millis((*next_retry).saturating_sub(unix_now)))
|
||||
}
|
||||
|
||||
/// Marks or updates a remote's health status as unhealthy. If the remote is
|
||||
|
||||
Reference in new issue
Block a user