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 { pub fn signal(&self, sig: &'static str) -> Result {
if let Err(e) = self.signal.send(sig) { self.signal.send(sig).ok();
return Err!("Failed to send signal: {e}");
}
Ok(()) Ok(())
} }

View File

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