From a46ba7699b44cd429d93c8a8a63316ccdb60f658 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 31 Jul 2019 14:38:11 +0800 Subject: [PATCH] client revamping compilation fix --- client.go | 2 +- main.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/client.go b/client.go index 044b1b9..f253280 100644 --- a/client.go +++ b/client.go @@ -15,7 +15,7 @@ func getLockedClient(id int64, createMissing bool) (*ChirpClient, bool) { c := new(ChirpClient) c.TGUserID64 = id c.Active = false - c.Lock() + c.Mux.Lock() muxClients.RUnlock() muxClients.Lock() clients[id] = c diff --git a/main.go b/main.go index 15594e8..fdebccd 100644 --- a/main.go +++ b/main.go @@ -151,10 +151,6 @@ func main() { TGCmdQueue = make(chan TGCommand, TGCmdQueueSize) MQTGCmdQueue = make(chan TGCommand, MQTGCmdQueueSize) JobQueue = make(chan Job, JobQueueSize) - clientsQueue = make(map[int64]*MQClient) - - clientsCW = new(sync.Map) - clientsKeepAlive = new(sync.Map) for w := 1; w <= MQGetMsgWorkers; w++ { go MQGetMsgWorker(w, MQCWMsgQueue)