xmppo / go-xmpp

Go XMPP Library (From Yasuhiro Matsumoto and based on the code from Russ Cox)
https://golang.org/
BSD 3-Clause "New" or "Revised" License
526 stars 170 forks source link

move nextMutex to Client to prevent blocking separate Clients #186

Closed vcabbage closed 5 months ago

vcabbage commented 5 months ago

Avoids a global mutex which could end up unexpectedly blocking a separate client. For example, if there were a client with few messages and a client with many messages, the client with few could hold the lock waiting for a token blocking the client with many from receiving.

mdosch commented 5 months ago

Thanks.