fix(service/sending): Avoid spawning restarted workers during shutdown

This commit is contained in:
Jade Ellis authored and Ellis Git committed 2026-11-22 17:21:50 +00:00
1 parent a0d9e71eac
commit 613bb1b2a8
1 file changed
+1 -1
+1 -1
View File
@@ -175,7 +175,7 @@ impl crate::Service for Service {
restarts.push(sleep(delay).map(move |()| shard));
},
Some(shard) = restarts.next() => {
if !self.channels[shard].1.is_closed() {
if !self.channels[shard].1.is_closed() && self.server.running() {
started[shard] = Instant::now();
self.spawn_sender(&mut senders, &mut shards, shard, true);
}