diff options
author | Andy Pan <panjf2000@gmail.com> | 2022-11-16 12:13:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 06:13:29 +0200 |
commit | b32a3dda13b7dcbd6e695254a9b9001434582ccf (patch) | |
tree | f6eb35a9d1b666adb95d096133a24b341696954f /fasthttputil | |
parent | Assert with *net.TCPConn instead of *net.TCPListener in acceptConn() for TCP ... (diff) | |
download | fasthttp-b32a3dda13b7dcbd6e695254a9b9001434582ccf.tar.gz fasthttp-b32a3dda13b7dcbd6e695254a9b9001434582ccf.tar.bz2 fasthttp-b32a3dda13b7dcbd6e695254a9b9001434582ccf.zip |
Use time.Until(deadline) instead of -time.Since(deadline) (#1434)
Diffstat (limited to 'fasthttputil')
-rw-r--r-- | fasthttputil/pipeconns.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fasthttputil/pipeconns.go b/fasthttputil/pipeconns.go index 704ec88..efe829f 100644 --- a/fasthttputil/pipeconns.go +++ b/fasthttputil/pipeconns.go @@ -266,7 +266,7 @@ func updateTimer(t *time.Timer, deadline time.Time) <-chan time.Time { if deadline.IsZero() { return nil } - d := -time.Since(deadline) + d := time.Until(deadline) if d <= 0 { return closedDeadlineCh } |