Compare commits
No commits in common. "4f2e76d70d5cc7deb1999521ad8325295f1898ac" and "6c812efc3f77970c57f3c1b0c9fdea58c94ae61f" have entirely different histories.
4f2e76d70d
...
6c812efc3f
|
@ -214,11 +214,6 @@ func sendWithTimeout(c *websocket.Conn, data entitys.Response, timeout time.Dura
|
|||
|
||||
done := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
done <- fmt.Errorf("panic in MsgSend: %v", r)
|
||||
}
|
||||
}()
|
||||
done <- entitys.MsgSend(c, data)
|
||||
}()
|
||||
|
||||
|
|
|
@ -47,8 +47,6 @@ func MsgSet(msgType ResponseType, msg string, done bool) []byte {
|
|||
}
|
||||
|
||||
func MsgSend(c *websocket.Conn, msg Response) error {
|
||||
// 检查上下文是否已取消
|
||||
|
||||
jsonByte, _ := json.Marshal(msg)
|
||||
|
||||
return c.WriteMessage(websocket.TextMessage, jsonByte)
|
||||
|
|
Loading…
Reference in New Issue