mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
Merge pull request #6868 from nextcloud/bugfix/avoidDeadlockWithImplicitHydrationSelfRequests
avoid deadlock: cancel hydration requests coming from itself
This commit is contained in:
commit
1af5872314
1 changed files with 6 additions and 0 deletions
|
@ -157,6 +157,12 @@ void CALLBACK cfApiFetchDataCallback(const CF_CALLBACK_INFO *callbackInfo, const
|
|||
callbackInfo->FileSize.QuadPart);
|
||||
};
|
||||
|
||||
if (QCoreApplication::applicationPid() == callbackInfo->ProcessInfo->ProcessId) {
|
||||
qCCritical(lcCfApiWrapper) << "implicit hydration triggered by the client itself. Will lead to a deadlock. Cancel";
|
||||
sendTransferError();
|
||||
return;
|
||||
}
|
||||
|
||||
auto vfs = reinterpret_cast<OCC::VfsCfApi *>(callbackInfo->CallbackContext);
|
||||
Q_ASSERT(vfs->metaObject()->className() == QByteArrayLiteral("OCC::VfsCfApi"));
|
||||
const auto path = QString(QString::fromWCharArray(callbackInfo->VolumeDosName) + QString::fromWCharArray(callbackInfo->NormalizedPath));
|
||||
|
|
Loading…
Reference in a new issue