Skip to content

Commit

Permalink
Fix panic in getAccAndResultFromCache
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Twigg <neil@nats.io>
  • Loading branch information
neilalexander authored and bruth committed Jul 29, 2024
1 parent ef6815c commit 61a37f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5436,7 +5436,9 @@ func (c *client) getAccAndResultFromCache() (*Account, *SublistResult) {

if !ok {
if c.kind == ROUTER && len(c.route.accName) > 0 {
acc = c.acc
if acc = c.acc; acc == nil {
return nil, nil
}
} else {
// Match correct account and sublist.
if acc, _ = c.srv.LookupAccount(string(c.pa.account)); acc == nil {
Expand Down

0 comments on commit 61a37f0

Please sign in to comment.