fix
This commit is contained in:
parent
3be83ed424
commit
59edb394fa
|
@ -119,6 +119,7 @@ func (w *wsConnectItem) heartbeat() {
|
|||
T: constants.WEBSOCKET_HEARTBEAT,
|
||||
D: "",
|
||||
}
|
||||
b, _ := json.Marshal(rsp)
|
||||
for {
|
||||
time.Sleep(time.Second * 10)
|
||||
select {
|
||||
|
@ -128,7 +129,6 @@ func (w *wsConnectItem) heartbeat() {
|
|||
|
||||
}
|
||||
//发送心跳信息
|
||||
b, _ := json.Marshal(rsp)
|
||||
if err := w.conn.WriteMessage(websocket.TextMessage, b); err != nil {
|
||||
logx.Error("发送心跳信息异常,关闭连接:", w.flag, err)
|
||||
w.close()
|
||||
|
|
Loading…
Reference in New Issue
Block a user