From c4fe58d8df51e8f07142803ec0522f862fd30a3f Mon Sep 17 00:00:00 2001 From: Yiyu Lin Date: Sun, 17 May 2020 12:50:38 +0800 Subject: Return error if more than one listener calls `WorkerHandle::get_event()` (#5461) --- cli/ops/worker_host.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/ops') diff --git a/cli/ops/worker_host.rs b/cli/ops/worker_host.rs index 479fcceaf..d1b4bb80f 100644 --- a/cli/ops/worker_host.rs +++ b/cli/ops/worker_host.rs @@ -306,7 +306,7 @@ fn op_host_get_message( }; let state_ = state.clone(); let op = async move { - let response = match worker_handle.get_event().await { + let response = match worker_handle.get_event().await? { Some(event) => { // Terminal error means that worker should be removed from worker table. if let WorkerEvent::TerminalError(_) = &event { -- cgit v1.2.3