Commit 416f7c26 authored by Max Kellermann's avatar Max Kellermann

db/upnp: don't hold mutex while downloading device description

Must not perform blocking I/O while holding a mutex.
parent b9f02f22
......@@ -61,7 +61,6 @@ UPnPDeviceDirectory::discoExplorer()
return;
}
const ScopeLock protect(mutex);
// Device signals its existence and well-being. Perform the
// UPnP "description" phase by downloading and decoding the
// description document.
......@@ -81,6 +80,7 @@ UPnPDeviceDirectory::discoExplorer()
continue;
}
const ScopeLock protect(mutex);
#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
auto e = directories.emplace(tsk->deviceId, d);
#else
......
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