[sheepdog] [PATCH V2 1/2] sheep: simplify client_decref() and move it into free_request() and add a helper function
Yunkai Zhang
yunkai.me at gmail.com
Fri Jul 6 12:56:43 CEST 2012
On Fri, Jul 6, 2012 at 6:47 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> On 07/06/2012 06:24 PM, Yunkai Zhang wrote:
>>> Is a double unregister-event fine? It seems like we don't protect
>>> > against that here.
>> I think it's no harm, unregister_event will call lookup_event() to check it.
>>
>
> Better assign fd = -1 in unregister_event() and then we can check it
No, this fd need to be closed by destroy_client() when ci->refcnt become zero.
> before unregister it. lookup_event() will printf a error message which
> will bewilder people who look at the log.
Maybe we can remove this error message?
>
--
Yunkai Zhang
Work at Taobao
More information about the sheepdog
mailing list