[FIXED] Data race, protect access to c.acc (#4550)

Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4549
This commit is contained in:
Derek Collison
2023-09-17 10:35:34 -07:00
committed by GitHub

View File

@@ -2159,9 +2159,9 @@ func (s *Server) accountConnectEvent(c *client) {
MQTTClient: c.getMQTTClientID(),
},
}
subj := fmt.Sprintf(connectEventSubj, c.acc.Name)
c.mu.Unlock()
subj := fmt.Sprintf(connectEventSubj, c.acc.Name)
s.sendInternalMsgLocked(subj, _EMPTY_, &m.Server, &m)
}