We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent ee5a474 commit e38d8d6Copy full SHA for e38d8d6
server/raft.go
@@ -553,8 +553,14 @@ func (n *raft) recreateInternalSubsLocked() error {
553
acc := n.s.accountNRGAllowed.Load()
554
if acc {
555
// Check whether the specific account has account NRG enabled.
556
- if a, _ := n.s.lookupAccount(n.accName); a != nil && a.js != nil {
557
- acc = a.js.accountNRG.Load()
+ if a, _ := n.s.lookupAccount(n.accName); a != nil {
+ a.mu.RLock()
558
+ ajs := a.js
559
+ a.mu.RUnlock()
560
+ // Check whether the specific account has JetStream enabled.
561
+ if ajs != nil {
562
+ acc = ajs.accountNRG.Load()
563
+ }
564
}
565
566
0 commit comments