Clear the fd from pending events after it's been processed

This commit is contained in:
Nils O. Selåsdal
2013-06-11 00:05:25 +02:00
parent 150edaeada
commit 504ee1315b
+2
View File
@@ -183,6 +183,8 @@ again:
fd->callback(mux_, fd, events); fd->callback(mux_, fd, events);
//be sure not to use fd after the callback, it might been removed. //be sure not to use fd after the callback, it might been removed.
mux->pending_events[i].data.ptr = NULL;
event_cnt++; event_cnt++;
} }
} }