Compare commits
No commits in common. "c17348d3ad5210ae30d5eaa882c07c3389cbe9e5" and "b65234689c2fef1636fa93201c5e3a91197cd11e" have entirely different histories.
c17348d3ad
...
b65234689c
|
|
@ -362,8 +362,7 @@ func ServerSendMsg(c *gin.Context) {
|
|||
if len(msgs) > 0 {
|
||||
msg := msgs[0]
|
||||
//发送消息
|
||||
msg_str, _ := json.Marshal(msg)
|
||||
_, err := c.Writer.Write([]byte("data: " + string(msg_str) + "\n\n"))
|
||||
_, err := c.Writer.Write([]byte("data: " + msg.Msg + "\n\n"))
|
||||
if err != nil {
|
||||
worker.SetRedisWithExpire("user_"+strconv.Itoa(user_id)+"_status_v2", "0", time.Second*3600)
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in New Issue