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:
parent
b9f02f22c4
commit
416f7c2600
@ -61,7 +61,6 @@ UPnPDeviceDirectory::discoExplorer()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ScopeLock protect(mutex);
|
|
||||||
// Device signals its existence and well-being. Perform the
|
// Device signals its existence and well-being. Perform the
|
||||||
// UPnP "description" phase by downloading and decoding the
|
// UPnP "description" phase by downloading and decoding the
|
||||||
// description document.
|
// description document.
|
||||||
@ -81,6 +80,7 @@ UPnPDeviceDirectory::discoExplorer()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ScopeLock protect(mutex);
|
||||||
#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
|
#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
|
||||||
auto e = directories.emplace(tsk->deviceId, d);
|
auto e = directories.emplace(tsk->deviceId, d);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user