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

Re: [Libevent-users] Setting timeout to NULL on bufferevents doesn't work as expected



On Mon, Aug 6, 2012 at 5:31 PM, Diwaker Gupta <diwaker@xxxxxxxxxxxxxx> wrote:
> I've filed a bug with all details and sample code that demonstrates
> the problem on Github:
> https://github.com/libevent/libevent/issues/16
>
> Nick: can you verify if my understand of the expected behavior is
> correct. That is, if I set timeout to NULL, any existing timers should
> get cancelled and no further timeouts should fire?

That's approximately right.

I don't believe that we defined whether setting the timeout to NULL
will cancel any currently pending timeouts.  That is, if the timeout
has already fired, and the corresponding event is active, I don't know
that we've defined whether setting the timeout to NULL will cancel the
callback or not.

It might be reasonable to define this, and define the answer to "yes"
-- it's a reasonable thing to want.

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