[hotfix] Use ref in WorkerPool::TryKillingIdleWorkers (#11017)

This commit is contained in:
Alex Wu 2020-09-24 17:23:56 -07:00 committed by GitHub
parent 3716fb1ca9
commit 0f168bf2ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -649,7 +649,7 @@ void WorkerPool::PushWorker(const std::shared_ptr<WorkerInterface> &worker) {
void WorkerPool::TryKillingIdleWorkers() {
size_t running_size = 0;
for (const auto worker : GetAllRegisteredWorkers()) {
for (const auto &worker : GetAllRegisteredWorkers()) {
if (!worker->IsDead()) {
running_size++;
}