Close websocket handler on error

This commit is contained in:
Yohann D'ANELLO 2020-11-07 15:00:33 +01:00
parent 59c47ca3e0
commit 26e7182085
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
err = conn.ReadJSON(c)
if err != nil {
log.Printf("Failed to receive client description: %s", err)
continue
_ = conn.Close()
return
}
// Get requested stream