fix a bug where a event fires twice due to bad active list handling

svn:r68
This commit is contained in:
Niels Provos 2003-04-30 19:23:27 +00:00
parent bdf5a68b95
commit 833f0c095d

View File

@ -337,7 +337,7 @@ event_add(struct event *ev, struct timeval *tv)
}
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);
return (evsel->add(evbase, ev));