diff --git a/router/router_server_ws.go b/router/router_server_ws.go index 4f60f93..f630240 100644 --- a/router/router_server_ws.go +++ b/router/router_server_ws.go @@ -51,8 +51,10 @@ func getServerWebsocket(c *gin.Context) { continue } - if err := handler.HandleInbound(j); err != nil { - handler.SendErrorJson(j, err) - } + go func(msg websocket.Message) { + if err := handler.HandleInbound(msg); err != nil { + handler.SendErrorJson(msg, err) + } + }(j) } }