aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-03-28 21:23:54 +0100
committerTom Smeding <tom.smeding@gmail.com>2020-03-28 21:30:41 +0100
commit3de8521e37c7d27439e7b599a32958920a31d176 (patch)
treedea80531fac9332affd85dd3c54822a080dc0670
parentd4ba9f948f5acc5f6c22db0b5f2a1666262acc59 (diff)
controller: Fix bug (don't exit upon arrival of new worker)
-rw-r--r--controller/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/controller/src/lib.rs b/controller/src/lib.rs
index 60b3639..0918542 100644
--- a/controller/src/lib.rs
+++ b/controller/src/lib.rs
@@ -404,15 +404,14 @@ fn thread_entry(
if let Some(worker) = workers_locked.get_mut(&worker_id) {
if worker.loaded_core != current_core_id {
- let current_core = current_core.unwrap().clone();
+ let current_core = current_core.as_ref().unwrap().clone();
worker_set_new_core(
worker, current_core_id, current_core, workers.clone(),
collector_sink.clone()
).await;
- return;
+ } else {
+ free_workers.push_back(worker_id);
}
-
- free_workers.push_back(worker_id);
}
}
}