'QtNetworkAccessManager doesn't work after network restart and issues QNetworkReply:UnknownNetworkError

I am a beginner in QT. I have a custom application which sends and receives information from my http server. When the network services are restarted, the Qt application doesn't connect with the server and issues network error as below. Also, after restart the issue gets resolved.

Here is my error log:

Network error QNetworkReply::UnknownNetworkError received requestFinished, code: 500 url: "xxxx/xxxx/xxxx" (unknown:0) - QIODevice::read (QDisabledNetworkReply): device not open

I have searched in forums but I couldn't get a solution to the same.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source