diff --git a/webserver/webserver.go b/webserver/webserver.go index 1fc845a..c30fcda 100644 --- a/webserver/webserver.go +++ b/webserver/webserver.go @@ -430,10 +430,12 @@ func statsHandler(w http.ResponseWriter, r *http.Request, dataDir string) { fmt.Fprintf(w, "\n") } -var upgrader websocket.Upgrader +var wsUpgrader = websocket.Upgrader { + HandshakeTimeout: 30 * time.Second, +} func wsHandler(w http.ResponseWriter, r *http.Request) { - conn, err := upgrader.Upgrade(w, r, nil) + conn, err := wsUpgrader.Upgrade(w, r, nil) if err != nil { log.Printf("Websocket upgrade: %v", err) return