diff --git a/lib/core/ogs-epoll.c b/lib/core/ogs-epoll.c index 86cbb1dfc..f74874b9d 100644 --- a/lib/core/ogs-epoll.c +++ b/lib/core/ogs-epoll.c @@ -125,6 +125,8 @@ static int epoll_add(ogs_poll_t *poll) if (poll->when & OGS_POLLOUT) map->write = poll; + memset(&ee, 0, sizeof ee); + ee.events = 0; if (map->read) ee.events |= (EPOLLIN|EPOLLRDHUP); @@ -164,6 +166,8 @@ static int epoll_remove(ogs_poll_t *poll) if (poll->when & OGS_POLLOUT) map->write = NULL; + memset(&ee, 0, sizeof ee); + ee.events = 0; if (map->read) ee.events |= (EPOLLIN|EPOLLRDHUP);