I've been having this issue for a firewall. My application makes a request through QNetworkAccessManager (or QHttp/QFtp) that sometimes cannot be completed. This can happen for several reasons:
  • Firewall is "freezing" the socket
  • Server is down or lagging
  • There is some network problem

My application is aimed to act as a daemon that continuously downloads and uploads data, so when the connection hangs, essentially the application stops performing its tasks. To resolve this problem I need to create a timeout, as there isn't one implemented by default. Here I run into issues though, as there doesn't seem to be a way of aborting a socket for Network Reply. For example this ends up crashing:
Qt Code:
  1. QNetworkReply *httpReply;
  2. httpReply = myNetworkAccessManager->get(request)
  3. ...
  4. httpReply->abort();
To copy to clipboard, switch view to plain text mode 
So, anyone have any ideas on how to resolve this?

Thanks in advance.