diff --git a/core/archipelago/src/mesh/outbox.rs b/core/archipelago/src/mesh/outbox.rs index b009bc69..70d96745 100644 --- a/core/archipelago/src/mesh/outbox.rs +++ b/core/archipelago/src/mesh/outbox.rs @@ -52,7 +52,10 @@ impl PendingMessage { return true; // Can't parse = treat as expired }; let age = chrono::Utc::now().signed_duration_since(created); - age.num_seconds() as u64 > self.ttl_secs + // Use `>=` so a ttl_secs=0 message is expired immediately (used by + // tests and by callers that want a fire-and-forget behavior when + // the relay can't deliver on first try). + age.num_seconds() as u64 >= self.ttl_secs } /// Check if this message can be relayed further.