mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-15 04:35:08 +02:00
epoll: update time *after* waiting...
This commit is contained in:
parent
6785e06f2b
commit
1ea5ef8944
1 changed files with 2 additions and 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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue