Otherwise it will not reset timeouts for the IO, but other things should
still works correctly.
Also evbuffer_remove_buffer() could return 0, due to empty buffers, for
example during flushing bufferevent, so let's count this is BEV_OK too.
(cherry picked from commit
4ba48739673060baea581774992970fa46c2f813)
enum bufferevent_flush_mode state, void *ctx)
{
(void)state;
- if (evbuffer_remove_buffer(src, dst, lim) == 0)
+ if (evbuffer_remove_buffer(src, dst, lim) >= 0)
return BEV_OK;
else
return BEV_ERROR;