mirror of https://github.com/gorilla/websocket.git
Duration order consistency when multiplying number by time unit (#570)
This commit is contained in:
parent
81cef7da56
commit
d11356942f
2
conn.go
2
conn.go
|
@ -429,7 +429,7 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er
|
||||||
maskBytes(key, 0, buf[6:])
|
maskBytes(key, 0, buf[6:])
|
||||||
}
|
}
|
||||||
|
|
||||||
d := time.Hour * 1000
|
d := 1000 * time.Hour
|
||||||
if !deadline.IsZero() {
|
if !deadline.IsZero() {
|
||||||
d = deadline.Sub(time.Now())
|
d = deadline.Sub(time.Now())
|
||||||
if d < 0 {
|
if d < 0 {
|
||||||
|
|
Loading…
Reference in New Issue