[sheepdog] [PATCH] sockfd_cache: close socket always when node is crashed

Liu Yuan namei.unix at gmail.com
Thu May 2 04:08:24 CEST 2013


On 05/02/2013 12:50 AM, MORITA Kazutaka wrote:
> @@ -498,7 +504,7 @@ void sheep_del_sockfd(const struct node_id *nid, struct sockfd *sfd)
>  		return;
>  	}
>  
> -	sockfd_cache_put(nid, sfd->idx);
> +	sockfd_cache_put(nid, sfd->idx, true);
>  	sockfd_cache_del(nid);
>  	free(sfd);
>  }

sockfd_cache_del don't close fd correctly? If so it is better to add
handling code in sockfd_cache_destroy() to close timeout-fd and pass idx
to sockfd_cache_del directly.

Thanks,
Yuan



More information about the sheepdog mailing list