Duration order consistency when multiplying number by time unit (#570)

This commit is contained in:
Maxim Fominykh 2020-03-19 19:01:23 +05:00 committed by GitHub
parent 81cef7da56
commit d11356942f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -429,7 +429,7 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er
maskBytes(key, 0, buf[6:])
}
d := time.Hour * 1000
d := 1000 * time.Hour
if !deadline.IsZero() {
d = deadline.Sub(time.Now())
if d < 0 {