Use `time.Equal` instead of direct comparison

pull/1557/head
Dmitry K 2023-03-22 13:32:53 +03:00 committed by Jack Christensen
parent 2f1bba09c4
commit e9d64ec29d
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func setSockMode(fd uintptr, mode sockMode) error {
}
func (c *NetConn) isDeadlineSet(dl time.Time) bool {
return !dl.IsZero() && dl != NonBlockingDeadline && dl != disableSetDeadlineDeadline
return !dl.IsZero() && !dl.Equal(NonBlockingDeadline) && !dl.Equal(disableSetDeadlineDeadline)
}
func (c *NetConn) isWriteDeadlineExpired() bool {