From ddb6039fa60de001efdc56106a0b119f517aa3a7 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Wed, 17 Feb 2021 20:55:11 +0100 Subject: [PATCH] Fix error handling in client actions. Thanks to Yacine. --- rtpconn/webclient.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtpconn/webclient.go b/rtpconn/webclient.go index 0976c03..4dd45f4 100644 --- a/rtpconn/webclient.go +++ b/rtpconn/webclient.go @@ -831,7 +831,10 @@ func clientLoop(c *webClient, ws *websocket.Conn) error { c.actions = nil c.mu.Unlock() for _, a := range actions { - handleAction(c, a) + err := handleAction(c, a) + if err != nil { + return err + } } case <-ticker.C: if time.Since(readTime) > 75*time.Second {