forked from mirror/websocket
Clear deadlines set by HTTP server.
This commit is contained in:
parent
bc19d3d337
commit
3d0e89148e
|
@ -184,6 +184,9 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
|
||||||
}
|
}
|
||||||
p = append(p, "\r\n"...)
|
p = append(p, "\r\n"...)
|
||||||
|
|
||||||
|
// Clear deadlines set by HTTP server.
|
||||||
|
netConn.SetDeadline(time.Time{})
|
||||||
|
|
||||||
if u.HandshakeTimeout > 0 {
|
if u.HandshakeTimeout > 0 {
|
||||||
netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout))
|
netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue