mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
fix a bug where a event fires twice due to bad active list handling
svn:r68
This commit is contained in:
parent
bdf5a68b95
commit
833f0c095d
2
event.c
2
event.c
@ -337,7 +337,7 @@ event_add(struct event *ev, struct timeval *tv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((ev->ev_events & (EV_READ|EV_WRITE)) &&
|
if ((ev->ev_events & (EV_READ|EV_WRITE)) &&
|
||||||
!(ev->ev_flags & EVLIST_INSERTED)) {
|
!(ev->ev_flags & (EVLIST_INSERTED|EVLIST_ACTIVE))) {
|
||||||
event_queue_insert(ev, EVLIST_INSERTED);
|
event_queue_insert(ev, EVLIST_INSERTED);
|
||||||
|
|
||||||
return (evsel->add(evbase, ev));
|
return (evsel->add(evbase, ev));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user