Remove "wants_reads" field from struct io_fd.
[srvx.git] / src / ioset-epoll.c
index e09f83fa6b3049836c6d57a10d826b4ee4a0aac5..a6b002eb4dec0e0c26e003c86fea5dd6b7b0c7a7 100644 (file)
@@ -46,7 +46,7 @@ static int
 ioset_epoll_events(struct io_fd *fd)
 {
     return EPOLLHUP
-        | (fd_wants_reads(fd) ? EPOLLIN : 0)
+        | EPOLLIN
         | (fd_wants_writes(fd) ? EPOLLOUT : 0)
         ;
 }
@@ -102,6 +102,7 @@ ioset_epoll_loop(struct timeval *timeout)
     msec = timeout ? (timeout->tv_sec * 1000 + timeout->tv_usec / 1000) : -1;
 
     res = epoll_wait(epoll_fd, evts, ArrayLength(evts), msec);
+    now = time(NULL) + clock_skew;
     if (res < 0) {
         if (errno != EINTR) {
             log_module(MAIN_LOG, LOG_ERROR, "epoll_wait() error %d: %s", errno, strerror(errno));