Hello Willy. On 25 February 2010 20:25, Willy Tarreau <w...@1wt.eu> wrote: > On Mon, Feb 15, 2010 at 10:05:57AM +0000, Nick Chalk wrote: >> On 13 February 2010 10:40, Willy Tarreau <w...@1wt.eu> wrote: >> > Indeed, with MSG_PEEK we have no way to tell the connection was closed. >> >> For the time being, I've hacked together a patch to get our customer >> up and running. >> >> I've allocated a new static character buffer, to store the >> intermediate results from the real server. I'm relying on recv() >> returning a length of 0 to indicate the server has closed the >> connection - not sure if that's a reliable method, but it seems to be >> repeatable. > > It will not always work with MSG_PEEK.
Sorry, I should have made it clear that I'd removed the MSG_PEEK flag. > The other temporary solution will be to allocate a receive buffer to > every server to store health check responses. Hmm, I hadn't considered that multiple checks could be running in parallel. I'll have a look at whether that can break my quick hack. Thanks, Nick. -- Nick Chalk. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/