From c69388682c632355269fe1f218a82ef3f12ad73d Mon Sep 17 00:00:00 2001 From: W192547975 <138874985+W192547975@users.noreply.github.com> Date: Wed, 15 May 2024 16:47:55 +0800 Subject: [PATCH 1/2] Heartbeat Echo Update Update loginhandler.go --- loginhandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loginhandler.go b/loginhandler.go index 024c7ed..ced8909 100644 --- a/loginhandler.go +++ b/loginhandler.go @@ -40,7 +40,7 @@ func (h *loginHandler) handleMessage(ctx *msgContext) error { } case MsgHeartbeat: wsSess.activeTime = time.Now() - wsSess.write(MsgHeartbeat, 0, "") + wsSess.writeBuf(ctx.msg) // gLog.Printf(LvINFO, "%s heartbeat ok", wsSess.node) default: return nil From 874a03601429252d57196c786060832f5cc2204b Mon Sep 17 00:00:00 2001 From: W192547975 <138874985+W192547975@users.noreply.github.com> Date: Wed, 15 May 2024 17:06:25 +0800 Subject: [PATCH 2/2] Heartbeat Echo Update Update loginhandler.go fix bug Buf -> Buff --- loginhandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loginhandler.go b/loginhandler.go index ced8909..e3dbb85 100644 --- a/loginhandler.go +++ b/loginhandler.go @@ -40,7 +40,7 @@ func (h *loginHandler) handleMessage(ctx *msgContext) error { } case MsgHeartbeat: wsSess.activeTime = time.Now() - wsSess.writeBuf(ctx.msg) + wsSess.writeBuff(ctx.msg) // gLog.Printf(LvINFO, "%s heartbeat ok", wsSess.node) default: return nil