[Interest] QNAM timeout is way too long

Thiago Macieira thiago.macieira at intel.com
Mon Apr 21 19:32:17 CEST 2014


Em seg 21 abr 2014, às 17:28:16, Scott Aron Bloom escreveu:
> 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. The problem, the timeout for the
> request, before failure seems WAY WAY too long, upwards of 30 seconds.
> 
> 
> Is there any way to reduce this??  It's a very very fst request, a 3-5
> second timeout, would actually be fine.

There's actually no timeout in QNAM. That timeout you're seeing is the 
QTcpSocket connection timeout. And no, it can't be changed.

If you want something shorter, create a QTimer.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list