Add EV_PERSIST flag to read events

This will avoid the need to constantly reschedule the event
This commit is contained in:
Mark Nunberg 2019-02-11 14:53:42 -05:00
parent 24e6166fed
commit f60c5506fe

View File

@ -98,7 +98,7 @@ static void redisLibeventUpdate(void *privdata, short flag, int isRemove) {
} }
event_del(e->ev); event_del(e->ev);
event_assign(e->ev, e->base, e->context->c.fd, e->flags, event_assign(e->ev, e->base, e->context->c.fd, e->flags | EV_PERSIST,
redisLibeventHandler, privdata); redisLibeventHandler, privdata);
event_add(e->ev, tv); event_add(e->ev, tv);
} }