From a5f46e1061f9a65805091c902ecef122a0f9e129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 28 Jul 2023 15:49:51 +0800 Subject: [PATCH] fix: nil mark_as_read --- driver/wsclient.go | 4 ++-- driver/wsserver.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/driver/wsclient.go b/driver/wsclient.go index eb2e604..fafa3d1 100644 --- a/driver/wsclient.go +++ b/driver/wsclient.go @@ -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) } diff --git a/driver/wsserver.go b/driver/wsserver.go index 9be687e..5a2ad43 100644 --- a/driver/wsserver.go +++ b/driver/wsserver.go @@ -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) }