1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 11:32:19 +00:00

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

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