Closed danielspk closed 3 years ago
Hello. I see the WASendWithMutex() method use a scope assignment which is not correct:
Original
func WASendWithMutex(jid string, content interface{}) (string, error) { mutex, ok := wacMutex[jid] if !ok { mutex := &sync.Mutex{} // <-- FIX? wacMutex[jid] = mutex } mutex.Lock() // <-- error if ok is false // ... }
Proposal:
func WASendWithMutex(jid string, content interface{}) (string, error) { mutex, ok := wacMutex[jid] if !ok { mutex = &sync.Mutex{} // <-- CHANGE wacMutex[jid] = mutex } mutex.Lock() // <-- work is ok is false // ... }
I am right?
Sorry, wrong repository
Hello. I see the WASendWithMutex() method use a scope assignment which is not correct:
Original
Proposal:
I am right?