From e9d64ec29d9063f8baadaa70c8f5958e9aecb66a Mon Sep 17 00:00:00 2001 From: Dmitry K Date: Wed, 22 Mar 2023 13:32:53 +0300 Subject: [PATCH] Use `time.Equal` instead of direct comparison --- internal/nbconn/nbconn_real_non_block_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nbconn/nbconn_real_non_block_windows.go b/internal/nbconn/nbconn_real_non_block_windows.go index 13524b73..fdf628f4 100644 --- a/internal/nbconn/nbconn_real_non_block_windows.go +++ b/internal/nbconn/nbconn_real_non_block_windows.go @@ -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 {