avoid error when doing hydration when data socket is closed too early

when data is received, if we close the socket they cannot be read

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2021-07-01 17:17:59 +02:00 committed by Matthieu Gallien (Rebase PR Action)
parent c1f0716d53
commit 4016c2fab0

View file

@ -204,7 +204,6 @@ void CALLBACK cfApiFetchDataCallback(const CF_CALLBACK_INFO *callbackInfo, const
QObject::connect(vfs, &OCC::VfsCfApi::hydrationRequestFinished, &loop, [&](const QString &id) { QObject::connect(vfs, &OCC::VfsCfApi::hydrationRequestFinished, &loop, [&](const QString &id) {
qDebug(lcCfApiWrapper) << "Hydration finished for request" << id; qDebug(lcCfApiWrapper) << "Hydration finished for request" << id;
if (requestId == id) { if (requestId == id) {
socket.close();
signalSocket.close(); signalSocket.close();
loop.quit(); loop.quit();
} }