From b6ab4a5f8465b1ceb725d86fdb6b702314a5bb96 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Wed, 17 Jul 2024 16:20:01 +0800 Subject: [PATCH] sub --- internal/msggateway/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index 446553dc0..d5368edf4 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -94,6 +94,11 @@ func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, longConnServer c.closedErr = nil c.token = ctx.GetToken() c.hbCtx, c.hbCancel = context.WithCancel(c.ctx) + if c.subUserIDs == nil { + c.subUserIDs = make(map[string]struct{}) + } else { + clear(c.subUserIDs) + } } func (c *Client) pingHandler(_ string) error {