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

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



Hi again,

I am currently using bufferevents to send and receive data (trunk version/2.0.3).

In the code, we do:

    evb = bufferevent_get_output(peer->connection.bev);
status = evbuffer_add_reference(evb, buf.ptr, buf.len, onsent_handler, userdata);

now, libevent picks up the data and informs us via onsent_handler, where we free our "buf" variable. So far, so good.


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?

Thanks and Cheers,
  Roman

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