mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
rgw: finalize reqs through a temporary set
can't call _finish_request() on iter->second when iterating, it clobbers the map. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
40832718fa
commit
1f741716cc
@ -632,9 +632,9 @@ void *RGWHTTPManager::reqs_thread_entry()
|
||||
}
|
||||
|
||||
RWLock::WLocker rl(reqs_lock);
|
||||
map<uint64_t, rgw_http_req_data *>::iterator iter = reqs.begin();
|
||||
for (; iter != reqs.end(); ++iter) {
|
||||
_finish_request(iter->second, -ECANCELED);
|
||||
auto all_reqs = std::move(reqs);
|
||||
for (auto iter : all_reqs) {
|
||||
_finish_request(iter.second, -ECANCELED);
|
||||
}
|
||||
|
||||
reqs.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user