Add EV_PERSIST flag to read events
This will avoid the need to constantly reschedule the event
This commit is contained in:
parent
24e6166fed
commit
f60c5506fe
@ -98,7 +98,7 @@ static void redisLibeventUpdate(void *privdata, short flag, int isRemove) {
|
||||
}
|
||||
|
||||
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);
|
||||
event_add(e->ev, tv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user