Search code examples
c++qt

QNetworkReply "unable to write"


Im trying to upload some data with the QNetworkManager and getting the response in QNetworkReply. Then i test, if the reply was an error and if, i print the error message and i dont understand the result.

if(reply->error()) {
        qDebug() << reply->error() << reply->errorString();
}

Result:

QNetworkReply::UnknownNetworkError "Unable to write"

What does the errorString "Unable to write" mean. Is this a return message from the Server or where does it come from?

I open QNetworkManager in a loop, is it a problem with opening to many Manager?


Solution

  • Don't construct QNetworkManager in loop.