IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
451 stars 153 forks source link

KeepAlive timeouts set too high on Nix platforms #457

Closed rlebeau closed 1 year ago

rlebeau commented 1 year ago

On Nix platforms, the TCP_KEEPIDLE and TCP_KEEPINTVL socket options are expressed in seconds.

TIdStackUnix.SetKeepAliveValues() and TIdStackLibc.SetKeepAliveValues() set the options in seconds, but then they call inherited, where TIdStack.SetKeepAliveValues() then resets the options in milliseconds, thus setting them too high.