On 05/04/2013 05:19 PM, MORITA Kazutaka wrote:
> From: MORITA Kazutaka <[email protected]>
> 
> Signed-off-by: MORITA Kazutaka <[email protected]>
> ---
>  lib/net.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/net.c b/lib/net.c
> index ebb0da6..464ccb7 100644
> --- a/lib/net.c
> +++ b/lib/net.c
> @@ -245,9 +245,11 @@ int connect_to(const char *name, int port)
>                       close(fd);
>                       break;
>               }
> -
> +reconnect:
>               ret = connect(fd, res->ai_addr, res->ai_addrlen);
>               if (ret) {
> +                     if (errno == EINTR)
> +                             goto reconnect;
>                       sd_eprintf("failed to connect to %s:%d: %m", name,
>                                  port);
>                       close(fd);
> 

Applied, thanks.

Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to