Prevent reading QNetworkReply in error case when not bytes available
This commit is contained in:
parent
1d5b90a693
commit
ad42c24c96
|
@ -816,7 +816,7 @@ void SyncthingConnection::emitError(const QString &message, const QJsonParseErro
|
|||
*/
|
||||
void SyncthingConnection::emitError(const QString &message, SyncthingErrorCategory category, QNetworkReply *reply)
|
||||
{
|
||||
emit error(message + reply->errorString(), category, reply->error(), reply->request(), reply->readAll());
|
||||
emit error(message + reply->errorString(), category, reply->error(), reply->request(), reply->bytesAvailable() ? reply->readAll() : QByteArray());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue