-----Original Message----- From: interest-bounces+scott.bloom=onshorecs....@qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On Behalf Of Thiago Macieira Sent: Monday, April 21, 2014 10:32 AM To: interest@qt-project.org Subject: Re: [Interest] QNAM timeout is way too long
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 ------------- The only problem, is QNetworkRequests::abort isn't a slot :( So I have to create an intermediary slot, figure out which request timedout, and abort it. Scott _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest