Explorar o código

Clear upgrader handshake deadline.

Gary Burd %!s(int64=11) %!d(string=hai) anos
pai
achega
1e6e1281b0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      server.go

+ 3 - 0
server.go

@@ -191,6 +191,9 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
 		netConn.Close()
 		return nil, err
 	}
+	if u.HandshakeTimeout > 0 {
+		netConn.SetWriteDeadline(time.Time{})
+	}
 
 	return c, nil
 }