From 92f64ddf7c5c13c86582154b4a361053559886e5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 3 Jul 2023 21:30:22 +0800 Subject: [PATCH] feat: conn update token --- internal/msggateway/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index fa72297b8..77677b2b6 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -53,6 +53,7 @@ type Client struct { longConnServer LongConnServer closed bool closedErr error + token string } func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client { @@ -65,7 +66,7 @@ func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client { ctx: ctx, } } -func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isBackground, isCompress bool, longConnServer LongConnServer) { +func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isBackground, isCompress bool, longConnServer LongConnServer, token string) { c.w = new(sync.Mutex) c.conn = conn c.PlatformID = utils.StringToInt(ctx.GetPlatformID()) @@ -77,6 +78,7 @@ func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isBackground, c.IsBackground = false c.closed = false c.closedErr = nil + c.token = token } func (c *Client) pongHandler(_ string) error { c.conn.SetReadDeadline(pongWait)