Skip to content

Commit

Permalink
fix ws
Browse files Browse the repository at this point in the history
  • Loading branch information
lz1998 committed Aug 4, 2021
1 parent 85d05c2 commit 7c2c268
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/safe_ws/safe_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ func NewSafeWebSocket(conn *websocket.Conn, OnRecvMessage func(ws *SafeWebSocket
}
continue
}
ws.OnRecvMessage(ws, messageType, data)
util.SafeGo(func() {
ws.OnRecvMessage(ws, messageType, data)
})
}
})

Expand Down

0 comments on commit 7c2c268

Please sign in to comment.