From 54bd3de38ba25b6067c02b0820f0a915c6a2c06d Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sun, 22 Nov 2020 13:52:37 +0800 Subject: [PATCH] try to fix oom. --- client/client.go | 3 ++- client/statistics.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index 395af5ec..3e539a26 100644 --- a/client/client.go +++ b/client/client.go @@ -87,7 +87,7 @@ type QQClient struct { groupDataTransSeq int32 highwayApplyUpSeq int32 eventHandlers *eventHandlers - stat Statistics + stat *Statistics groupListLock sync.Mutex } @@ -179,6 +179,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient { onlinePushCache: utils.NewCache(time.Second * 15), version: genVersionInfo(SystemDeviceInfo.Protocol), servers: []*net.TCPAddr{}, + stat: &Statistics{}, } sso, err := getSSOAddress() if err == nil && len(sso) > 0 { diff --git a/client/statistics.go b/client/statistics.go index d11e5184..9df54262 100644 --- a/client/statistics.go +++ b/client/statistics.go @@ -14,6 +14,6 @@ type Statistics struct { once sync.Once } -func (c *QQClient) GetStatistics() Statistics { +func (c *QQClient) GetStatistics() *Statistics { return c.stat }