Merge branch 'refs/heads/feature-im-gitea'
This commit is contained in:
commit
c17348d3ad
|
|
@ -362,7 +362,8 @@ func ServerSendMsg(c *gin.Context) {
|
|||
if len(msgs) > 0 {
|
||||
msg := msgs[0]
|
||||
//发送消息
|
||||
_, err := c.Writer.Write([]byte("data: " + msg.Msg + "\n\n"))
|
||||
msg_str, _ := json.Marshal(msg)
|
||||
_, err := c.Writer.Write([]byte("data: " + string(msg_str) + "\n\n"))
|
||||
if err != nil {
|
||||
worker.SetRedisWithExpire("user_"+strconv.Itoa(user_id)+"_status_v2", "0", time.Second*3600)
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in New Issue