// ProbeDialer returns a dialer optimized for probes to avoid lingering sockets on TIME-WAIT state. // The dialer reduces the TIME-WAIT period to 1 seconds instead of the OS default of 60 seconds. // Using 1 second instead of 0 because SO_LINGER socket option to 0 causes pending data to be // discarded and the connection to be aborted with an RST rather than for the pending data to be // transmitted and the connection closed cleanly with a FIN. // Ref: https://issues.k8s.io/89898 func ProbeDialer() *net.Dialer { … }