Merge pull request #280 from znly/master

Concurrent map access in server/route.go
This commit is contained in:
Derek Collison
2016-05-20 09:16:14 -07:00

View File

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