Hi David,

On Mon, Sep 02, 2013 at 11:44:14PM +0200, David BERARD wrote:
> Hi,
> 
> I've an issue with send-proxy on HAProxy-1.5-dev19 running on FreeBSD.
>  
> Since dev13 I can't get send-proxy to work on FreeBSD, connections to 
> the backend server (another haproxy with accept-proxy bind option) are 
> imediately closed.
> 
> Version dev12 works correctly on FreeBSD, and dev19 on Linux works too.
> 
> Connection seem to be closed in stream_interface.c (out_error) :
> 
>  470                 if (ret < 0) {
>  471                         if (errno == EAGAIN)
>  472                                 goto out_wait;
>  473                         goto out_error;           <<<<<<
>  474                 }

Strangely this part has not changed between dev12 and dev13, but I suspect
it's a timing issue caused by other fixes (dev12 introduced the rework of
the connection management and was full of complex bugs).

It would be nice if you could add a "perror("send_proxy")" just before
goto out_error. I suspect you're getting ENOTCONN that is correctly
handled in raw_sock.c but not here.

Alternately, could you try the following change :

   471 -              if (errno == EAGAIN)
   471 +              if (errno == EAGAIN || errno == ENOTCONN)

Thanks,
Willy


Reply via email to