Add comment

This commit is contained in:
Tevin Zhang 2019-02-13 10:20:15 +08:00
parent 0fca588859
commit f79f8fc471
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ func (c *Checker) CheckAddr(addr string, timeout time.Duration) (err error) {
return c.CheckAddrZeroLinger(addr, timeout, c.zeroLinger)
}
// CheckAddrZeroLinger is like CheckAddr with an extra parameter indicating whether to enable zero linger.
func (c *Checker) CheckAddrZeroLinger(addr string, timeout time.Duration, zeroLinger bool) error {
// Set deadline
deadline := time.Now().Add(timeout)