Commit 1f3d7203 authored by Dominik Charousset's avatar Dominik Charousset

Fix possible segfault in curl_fuse example

parent 99c3b1aa
......@@ -324,7 +324,11 @@ protected:
}
auto worker_finished = [=] {
auto sender = current_sender();
auto i = std::find(busy_worker_.begin(), busy_worker_.end(), sender);
auto last = busy_worker_.end();
auto i = std::find(busy_worker_.begin(), last, sender);
if (i == last) {
return;
}
idle_worker_.push_back(*i);
busy_worker_.erase(i);
print() << "worker is done" << color::reset_endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment