curl / Mailing Lists / curl-library / Single Mail


Re: unexpected code 35 (if tcp listen backlog is full)

From: Daniel Stenberg <>
Date: Sun, 14 Jan 2018 23:02:52 +0100 (CET)

On Sun, 14 Jan 2018, Michael Kilburn wrote:

> this:
> suggests it is possible -- if accept queue is full, ACK gets discarded while
> from client perspective connection is established and it will start sending
> data (initiating TLS handshake). And eventual RST from server (because it
> could not acknowledge resent ACKs due to full accept queue) will cause
> connection drop while libcurl TLS logic waits for response. Do you think
> this is what happens? Can code 35 be returned in this situation?

It seems like a plausible scenario, yes!

> If I am to use my own cache of easy handles -- how it is going to work wrt
> TLS? Afair, TLS handshake needs to be renewed/renegotiated on regular basis
> -- what if my handle wasn't used for 10 mins? 2 hours?

libcurl will handle that for you transparently. You should always be able to
re-use an existing easy handle for subsequent requests. Also, if you use the
multi interface, the connection pool is actually owned/held by the multi
handle so then re-using easy handles isn't that important.

Received on 2018-01-14