pcp
[Top] [All Lists]

Re: Connection timeouts and getaddrinfo

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: Connection timeouts and getaddrinfo
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 3 May 2016 19:26:20 -0400 (EDT)
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5728D408.8070107@xxxxxxxxxx>
References: <1046898355.44816857.1462256769212.JavaMail.zimbra@xxxxxxxxxx> <5728D408.8070107@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: X0gWVR8ukvw+X/zyl67dCwylYjdQUg==
Thread-topic: Connection timeouts and getaddrinfo
Hi Dave,

----- Original Message -----
> On 05/03/2016 02:26 AM, Nathan Scott wrote:
> > [...]
> > Not sure what the correct behaviour should be here - thoughts?
> > Seems like its probably not doing what users would expect atm.
> >
> The delay is applied during the call __pmSelectWrite(). One thing we
> could try would be to open a socket for each address, use the select to
> wait on all of them at once, and choose the one that's selected. If the
> timeout expires, then we can assume that they all timed out and we will
> have applied the timeout once for all of the addresses. I can't think of
> another way to apply one timeout while trying all of the addresses.
> 

*nod*

> The downside is that PMCD will see several connections, some (most?) of
> which will succeed and then be abandoned.

Yeah.  pmcd also has an optional connection-count-limit feature that we
might bump into this way ... but I think those downsides are probably
outweighed by having the timeout applied in a way people would expect.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>