[sheepdog] [PATCH] sheep: try to clear conn.blocking_siblings when EPOLLERR/EPOLLHUP occur
Liu Yuan
namei.unix at gmail.com
Fri Jun 29 14:50:28 CEST 2012
On 06/29/2012 03:26 PM, Yunkai Zhang wrote:
> From: Yunkai Zhang <qiushu.zyk at taobao.com>
>
>
> Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
> ---
> sheep/sdnet.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sheep/sdnet.c b/sheep/sdnet.c
> index 04eb4c1..a4f0db3 100644
> --- a/sheep/sdnet.c
> +++ b/sheep/sdnet.c
> @@ -738,11 +738,13 @@ static void client_handler(int fd, int events, void *data)
> client_tx_handler(ci);
>
> if (is_conn_dead(&ci->conn)) {
> - if (!list_empty(&ci->conn.blocking_siblings))
> - list_del_init(&ci->conn.blocking_siblings);
> err:
> dprintf("closed connection %d, %s:%d\n", fd,
> ci->conn.ipstr, ci->conn.port);
> +
> + if (!list_empty(&ci->conn.blocking_siblings))
> + list_del_init(&ci->conn.blocking_siblings);
> +
> unregister_event(fd);
> client_decref(ci);
> }
>
Applied, thanks.
Yuan
More information about the sheepdog
mailing list