fix a bug that move a const variable (#9080)

This commit is contained in:
Zhilei Chen
2020-06-23 11:54:18 +08:00
committed by GitHub
parent 40c15b1ba0
commit 8f2564f1a6
+3 -3
View File
@@ -389,14 +389,14 @@ void WorkerPool::PushWorker(const std::shared_ptr<Worker> &worker) {
// The worker is used for the actor creation task with dynamic options.
// Put it into idle dedicated worker pool.
const auto task_id = it->second;
state.idle_dedicated_workers[task_id] = std::move(worker);
state.idle_dedicated_workers[task_id] = worker;
} else {
// The worker is not used for the actor creation task without dynamic options.
// Put the worker to the corresponding idle pool.
if (worker->GetActorId().IsNil()) {
state.idle.insert(std::move(worker));
state.idle.insert(worker);
} else {
state.idle_actor[worker->GetActorId()] = std::move(worker);
state.idle_actor[worker->GetActorId()] = worker;
}
}
}