diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-25 21:50:29 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-25 21:50:29 +0200 |
commit | 1ea5ef8944db5da3ff9eeb2d72bcf8a887599925 (patch) | |
tree | d6c209f265bccd99c07caa8726ec96c6296158c4 /src | |
parent | 6785e06f2b062616d190b043a18fd40826b21043 (diff) | |
download | fastd-1ea5ef8944db5da3ff9eeb2d72bcf8a887599925.tar fastd-1ea5ef8944db5da3ff9eeb2d72bcf8a887599925.zip |
epoll: update time *after* waiting...
Diffstat (limited to 'src')
-rw-r--r-- | src/poll.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |