client revamping compilation fix

This commit is contained in:
shoopea 2019-07-31 14:38:11 +08:00
parent d2e1840f13
commit a46ba7699b
2 changed files with 1 additions and 5 deletions

View File

@ -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

View File

@ -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)