> +static void clear_client(struct client_info *ci)
> +{
> +     if (!list_empty(&ci->conn.blocking_siblings))
> +             list_del_init(&ci->conn.blocking_siblings);
> +
> +     unregister_event(ci->conn.fd);

Is a double unregister-event fine?  It seems like we don't protect
against that here.

>  static void client_decref(struct client_info *ci)
>  {
> -     if (ci && --ci->refcnt == 0)
> -             destroy_client(ci);
> +     if (ci)
> +             ci->refcnt--;

It seems like client_incref / client_decref should just go away,
they contain an unneeded NULL check and otherwise just do a trivial
-- / ++ operation and only have a singler caller each.

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

Reply via email to