diff options
Diffstat (limited to 'cli/ops/worker_host.rs')
-rw-r--r-- | cli/ops/worker_host.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cli/ops/worker_host.rs b/cli/ops/worker_host.rs index 0b36e2c47..11529c686 100644 --- a/cli/ops/worker_host.rs +++ b/cli/ops/worker_host.rs @@ -155,13 +155,6 @@ fn run_worker_thread( if let Err(e) = result { let mut sender = worker.internal_channels.sender.clone(); - - // If sender is closed it means that worker has already been closed from - // within using "globalThis.close()" - if sender.is_closed() { - return; - } - sender .try_send(WorkerEvent::TerminalError(e)) .expect("Failed to post message to host"); @@ -173,8 +166,7 @@ fn run_worker_thread( // TODO(bartlomieju): this thread should return result of event loop // that means that we should store JoinHandle to thread to ensure // that it actually terminates. - rt.block_on(worker.run_event_loop()) - .expect("Panic in event loop"); + rt.block_on(worker).expect("Panic in event loop"); debug!("Worker thread shuts down {}", &name); })?; |