Skip to content

Commit

Permalink
fix: nil mark_as_read
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jul 28, 2023
1 parent a433140 commit a5f46e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions driver/wsclient.go
Expand Up @@ -123,11 +123,11 @@ func (ws *WSClient) Listen(handler func([]byte, zero.APICaller)) {
}
close(c) // channel only use once
}
return
continue
}
if rsp.Get("meta_event_type").Str != "heartbeat" { // 忽略心跳事件
log.Debug("[ws] 接收到事件: ", helper.BytesToString(payload))
return
continue
}
handler(payload, ws)
}
Expand Down
4 changes: 2 additions & 2 deletions driver/wsserver.go
Expand Up @@ -194,11 +194,11 @@ func (wssc *WSSCaller) listen(handler func([]byte, zero.APICaller)) {
}
close(c) // channel only use once
}
return
continue
}
if rsp.Get("meta_event_type").Str != "heartbeat" { // 忽略心跳事件
log.Debug("[wss] 接收到事件: ", helper.BytesToString(payload))
return
continue
}
handler(payload, wssc)
}
Expand Down

0 comments on commit a5f46e1

Please sign in to comment.