Skip to content

Commit

Permalink
Duration order consistency when multiplying number by time unit (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxifom authored Mar 19, 2020
1 parent 81cef7d commit d113569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d113569

Please sign in to comment.