Commit bc54fd1d authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Issue #10: Make sure the Request is not deleted while waiting

parent 7854216b
......@@ -593,9 +593,9 @@ void VolumeDataAccessManagerImpl::FlushUploadQueue()
{
std::unique_lock<std::mutex> lock(m_mutex);
if(m_pendingUploadRequests.empty()) break;
Request &request = *m_pendingUploadRequests.begin()->second.request;
std::shared_ptr<Request> request = m_pendingUploadRequests.begin()->second.request;
lock.unlock();
request.WaitForFinish();
request->WaitForFinish();
}
for(auto it = m_vds.layerMetadataContainer.managers.begin(); it != m_vds.layerMetadataContainer.managers.end(); ++it)
......
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