Clear the fd from pending events after it's been processed
This commit is contained in:
@@ -183,6 +183,8 @@ again:
|
||||
fd->callback(mux_, fd, events);
|
||||
//be sure not to use fd after the callback, it might been removed.
|
||||
|
||||
mux->pending_events[i].data.ptr = NULL;
|
||||
|
||||
event_cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user