[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] cancelled bufferevents and evbuffer_add_reference (2.0.3)



On Sat, Feb 20, 2010 at 12:26 PM, Roman Puls <puls@xxxxxxxxxxxx> wrote:
> However, I ask myself what happens if we destroy the bufferevent during an
> ongoing send operation:
>
> app: evbuffer_add_ref(buf)
> levent: start sending on buf
> app: delete bufferevent
>
> Will we get a callback on the "onsent_handler" or not?

Hi Roman,

you should get the callback.   The callback happens when the evbuffer
chain becomes unreferenced.   Deleting the bufferevent will free the
evbuffer and that will trigger the callback.

Niels.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.