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

Must not perform blocking I/O while holding a mutex.
This commit is contained in:
Max Kellermann 2014-01-18 13:04:01 +01:00
parent b9f02f22c4
commit 416f7c2600

View File

@ -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