mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-05 16:26:50 +08:00
Remove websocket error on disconnect
This commit is contained in:
@@ -141,11 +141,7 @@ func apiWS(w http.ResponseWriter, r *http.Request) {
|
|||||||
for {
|
for {
|
||||||
msg := new(streamer.Message)
|
msg := new(streamer.Message)
|
||||||
if err := ctx.Conn.ReadJSON(msg); err != nil {
|
if err := ctx.Conn.ReadJSON(msg); err != nil {
|
||||||
if websocket.IsUnexpectedCloseError(
|
log.Trace().Err(err).Caller().Send()
|
||||||
err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure,
|
|
||||||
) {
|
|
||||||
log.Error().Err(err).Msg("[api.ws] readJSON")
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user