mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #280 from znly/master
Concurrent map access in server/route.go
This commit is contained in:
@@ -423,7 +423,10 @@ func (s *Server) routeSidQueueSubscriber(rsid []byte) (*subscription, bool) {
|
||||
}
|
||||
sid := matches[RSID_SID_INDEX]
|
||||
|
||||
if sub, ok := client.subs[string(sid)]; ok {
|
||||
client.mu.Lock()
|
||||
sub, ok := client.subs[string(sid)]
|
||||
client.mu.Unlock()
|
||||
if ok {
|
||||
return sub, true
|
||||
}
|
||||
return nil, true
|
||||
|
||||
Reference in New Issue
Block a user