Fix reusing FTP connection after abort

The QNetworkAccessCache was keeping the connection alive and it was
trying to reuse it for subsequent calls to download files from the
same server. After closing the connection, it is not usable anymore
and a new one should be created.

Task-number: QTBUG-40368
Change-Id: I1a0d08956a94eb36f39d14112cdcab6c1e2add82
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Jesus Fernandez 2017-04-05 18:35:52 +02:00 committed by Jesus Fernandez
parent 872bff5b24
commit 4a6cb89f29

View File

@ -114,7 +114,7 @@ QNetworkAccessFtpBackend::~QNetworkAccessFtpBackend()
//if backend destroyed while in use, then abort (this is the code path from QNetworkReply::abort)
if (ftp && state != Disconnecting)
ftp->abort();
disconnectFromFtp();
disconnectFromFtp(RemoveCachedConnection);
}
void QNetworkAccessFtpBackend::open()