diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-22 21:44:09 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-22 21:44:09 +0200 |
commit | 051630a401e1938ef27d833a5a5231d0a682ec8b (patch) | |
tree | 8219cf9fbe185f45c190f5263ae27711d7edb097 | |
parent | 1c0972d6d676df42410b07575011c4c9a5b2c05d (diff) | |
download | rebel-051630a401e1938ef27d833a5a5231d0a682ec8b.tar rebel-051630a401e1938ef27d833a5a5231d0a682ec8b.zip |
executor: return error when reply channel is closed unexectedly
-rw-r--r-- | src/executor.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/executor.rs b/src/executor.rs index 99a2804..39e262d 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -303,7 +303,12 @@ impl<'ctx> Executor<'ctx> { progress = true; } ipc::IpcSelectionResult::ChannelClosed(id) => { - self.tasks_running.remove(&id); + if let Some(task) = self.tasks_running.remove(&id) { + return Err(Error::new(format!( + "Unexpectedly got no result for task {:#}", + task + ))); + } } } } |