cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Loosing connection on iOS hangs request

From: <Vincas.Razma_at_bentley.com>
Date: Tue, 24 Nov 2015 12:23:01 +0000

>Please don't top post. It's hard to follow the thread this way.
>
>> >You don't mention any step where WiFi is turned back on. Naturally, it's hard to resolve a host without a network connection.
>> One WiFi is turned back on and connects to network requests execute successfully without additional delays. Testing same workflow with iOS Safari or Chrome browsers make them respond a lot quacking (with few second delay) after WiFi was turned off or network connection lost (by turning off WiFi hotspot).
>
>It's not completely clear to me what the problem is that you're reporting. Is it the delay in the first DNS resolution after turning off the network? This could be simply that the DNS resolver has cached the address so it doesn't need to look it up on the next connection, so you get the connection timeout.

Yes, few minutes delay can be problematic and bad user experience. On same note - similar behavior occurs when app is send to background on iOS - resumed app curl requests are hanged and wait until timeout. We have workaround there - cancel all active requests and retry - but that is not ideal.

>>
>> >Which DNS resolver?
>> How do I check that?
>
>curl --version (or curl_version/curl_version_info) will say.

culr_version() output is "libcurl/7.37.0 OpenSSL/1.0.1p zlib/1.2.8"

> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On
> Behalf Of Dan Fandrich
> Sent: 2015 m. lapkriÄŤio 20 d. 22:40
> To: curl-library_at_cool.haxx.se
> Subject: Re: Loosing connection on iOS hangs request
>
> On Fri, Nov 20, 2015 at 04:08:53PM +0000, Vincas.Razma_at_bentley.com wrote:
> > Workflow:
> >
> > 1) Execute HTTPS request – gets response and finishes with CURLE_OK.
> >
> > 2) Turn off WiFi (or loose connection other way)
> >
> > 3) Execute HTTPS request – completes after set timeout (usually 3 minutes)
> > minutes with CURLE_OPERATION_TIMEDOUT. Same happens if request was
> > in progress of downloading data.
> >
> > 4) Execute HTTPS request – completes instantly with
> > CURLE_COULDNT_RESOLVE_HOST. This is true for all subsequent requests.
>
> You don't mention any step where WiFi is turned back on. Naturally, it's hard to resolve a host without a network connection.
>
> > Is this issue known? We are reproducing this for last two years with
> > various iOS versions and several CURL updates.
> >
> >
> >
> > iOS 9, Libcurl/7.37.0 OpenSSL/1.0.1p, curl_multi/curl_easy APIs
>
> Which DNS resolver?
>
> >>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-11-24