Avoid reading reply data if the reply isn't open
This might be the case when the request has been aborted. Reading from the reply in this case would result in an unwanted log message from Qt.
This commit is contained in:
parent
3e28db37e8
commit
986959c8b2
|
@ -111,7 +111,7 @@ SyncthingConnection::Reply SyncthingConnection::prepareReply(QList<QNetworkReply
|
|||
SyncthingConnection::Reply SyncthingConnection::handleReply(QNetworkReply *reply, bool readData, bool handleAborting)
|
||||
{
|
||||
const auto log = m_loggingFlags & SyncthingConnectionLoggingFlags::ApiReplies;
|
||||
readData = readData || log;
|
||||
readData = (readData || log) && reply->isOpen();
|
||||
handleAborting = handleAborting && m_abortingAllRequests;
|
||||
const auto data = Reply{
|
||||
.reply = handleAborting ? nullptr : reply, // skip further processing if aborting to reconnect
|
||||
|
|
Loading…
Reference in New Issue