back

by signa11·17y ago·view on hn ↗
> Contrary to both the Libev page and Marek's analysis, setting timeouts on individual I/O events is not the only way to implement "idle timeouts"

just a quick question: what would you consider, is a superior approach to idle-timeouts ? thanks for you insights !

2 comments
Use another data structure to track connections by liveness, which you can measure by timestamping on each RX event. Relax the requirement that an connection idle timeout of 60 seconds must fire in exactly 60,000 milliseconds; 60, 61, 65, nobody cares.