igmpproxy
igmpproxy copied to clipboard
fix timeout of age_callout_queue
timeout->tv_sec = (secs > 3) ? 3 : secs; // aimwang: set max timeout
pselect return max timeout is 3 seconds not secs when Rt==0
I have found that issue too and fixed it like in this PR. On FreeBSD, this patch works like expected.
I think this is the same as in #59 . When the solution there works like expected, I think we should probably use it over this because of portability.
I guess that instead of using undefined value timeout->tv_sec you can use (secs > 3) ? 3 : secs or call clock_gettime with CLOCK_MONOTONIC.