Fix shutdown signalling on startup.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-04 03:04:39 +00:00
parent 46193de7e8
commit 53ab6742c8
2 changed files with 4 additions and 5 deletions

View File

@@ -104,10 +104,7 @@ impl Server {
}
pub fn signal(&self, sig: &'static str) -> Result {
if let Err(e) = self.signal.send(sig) {
return Err!("Failed to send signal: {e}");
}
self.signal.send(sig).ok();
Ok(())
}

View File

@@ -137,10 +137,10 @@ impl Service {
statuses: &mut CurTransactionStatus,
) {
match response {
| Err((dest, e)) => Self::handle_response_err(dest, statuses, &e),
| Ok(dest) =>
self.handle_response_ok(&dest, futures, statuses)
.await,
| Err((dest, e)) => Self::handle_response_err(dest, statuses, &e),
}
}
@@ -149,8 +149,10 @@ impl Service {
statuses.entry(dest).and_modify(|e| {
*e = match e {
| TransactionStatus::Running => TransactionStatus::Failed(1, Instant::now()),
| &mut TransactionStatus::Retrying(ref n) =>
TransactionStatus::Failed(n.saturating_add(1), Instant::now()),
| TransactionStatus::Failed(..) => {
panic!("Request that was not even running failed?!")
},