Don't block websocket from handling another message when a long running proccess is triggered

This commit is contained in:
Dane Everitt 2020-07-18 16:45:10 -07:00
parent 8315ff8ae1
commit 6de18f09e5
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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)
}
}