diff options
-rw-r--r-- | src/network/access/qnetworkaccessftpbackend.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp index 6b9ce50..2b97b66 100644 --- a/src/network/access/qnetworkaccessftpbackend.cpp +++ b/src/network/access/qnetworkaccessftpbackend.cpp @@ -107,6 +107,9 @@ QNetworkAccessFtpBackend::QNetworkAccessFtpBackend() 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(); } |