Ignoring supervisor kill/signal internal errors
As the errors only occur when the process is dead anyway
This commit is contained in:
parent
b728bfecfc
commit
ec6b508894
|
@ -328,7 +328,7 @@ async fn apply_outcome(
|
|||
return Err(RuntimeError::Exit);
|
||||
}
|
||||
(Some(p), Outcome::Stop) => {
|
||||
p.kill().await?;
|
||||
p.kill().await;
|
||||
p.wait().await?;
|
||||
*process = None;
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ async fn apply_outcome(
|
|||
|
||||
(Some(p), Outcome::Signal(sig)) => {
|
||||
// TODO: windows
|
||||
p.signal(sig).await?;
|
||||
p.signal(sig).await;
|
||||
}
|
||||
|
||||
(_, Outcome::Clear) => {
|
||||
|
|
|
@ -141,20 +141,16 @@ impl Supervisor {
|
|||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub async fn signal(&self, signal: Signal) -> Result<(), RuntimeError> {
|
||||
pub async fn signal(&self, signal: Signal) {
|
||||
trace!(?signal, "sending signal intervention");
|
||||
self.intervene
|
||||
.send(Intervention::Signal(signal))
|
||||
.await
|
||||
.map_err(|err| RuntimeError::InternalSupervisor(err.to_string()))
|
||||
self.intervene.send(Intervention::Signal(signal)).await.ok();
|
||||
// only errors on channel closed, and that only happens if the process is dead
|
||||
}
|
||||
|
||||
pub async fn kill(&self) -> Result<(), RuntimeError> {
|
||||
pub async fn kill(&self) {
|
||||
trace!("sending kill intervention");
|
||||
self.intervene
|
||||
.send(Intervention::Kill)
|
||||
.await
|
||||
.map_err(|err| RuntimeError::InternalSupervisor(err.to_string()))
|
||||
self.intervene.send(Intervention::Kill).await.ok();
|
||||
// only errors on channel closed, and that only happens if the process is dead
|
||||
}
|
||||
|
||||
pub fn is_running(&self) -> bool {
|
||||
|
|
Loading…
Reference in New Issue