[LINUX] initialize struct epoll_event (#1399)

This commit is contained in:
Sukchan Lee 2022-03-01 21:03:27 +09:00
parent 19120acadc
commit 3217e93124
1 changed files with 4 additions and 0 deletions

View File

@ -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);