summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/poll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/poll.c b/src/poll.c
index 2a2ef34..4ccf7de 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -158,8 +158,6 @@ void fastd_poll_handle(void) {
if (timeout < 0 || timeout > maintenance_timeout)
timeout = maintenance_timeout;
- fastd_update_time();
-
struct epoll_event events[16];
int ret = epoll_wait(ctx.epoll_fd, events, 16, timeout);
if (ret < 0) {
@@ -169,6 +167,8 @@ void fastd_poll_handle(void) {
exit_errno("epoll_wait");
}
+ fastd_update_time();
+
size_t i;
for (i = 0; i < (size_t)ret; i++) {
if (events[i].data.ptr == &ctx.tunfd) {