[Interest] QNAM timeout is way too long

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Tue Apr 22 06:52:48 CEST 2014


On Mon, Apr 21, 2014 at 10:58 PM, Scott Aron Bloom
<scott.bloom at onshorecs.com> wrote:
> I have code, that sends a http request via  QNetworkAccessManager.
> Unfortunately, there are times, where the network on the machine will be up,
> but the connection to the internet is down.. Or the internet is up, but the
> backend server is down.  Meaning, there is no way for my application to
> “know” don’t bother trying to connect.

If you're running on a Linux system, you could try changing the
default TCP timeout by changing /proc/sys/net/ipv4/tcp_syn_retries or
/proc/sys/net/ipv4/tcp_keepalive_time depending on what stage you're
getting stuck at. Although this would be a platform specific hack and
would affect other applications too.

-mandeep



More information about the Interest mailing list