Skip to content

Commit

Permalink
Use an account protected method to check for service imports for Gate…
Browse files Browse the repository at this point in the history
…ways. (#4274)

This avoids a potential data race when reloading accounts.

Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Jun 28, 2023
2 parents 83db312 + 9805101 commit 68a17a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/gateway.go
Expand Up @@ -2953,7 +2953,7 @@ func (c *client) processInboundGatewayMsg(msg []byte) {
// Check if this is a service reply subject (_R_)
noInterest := len(r.psubs) == 0
checkNoInterest := true
if acc.imports.services != nil {
if acc.NumServiceImports() > 0 {
if isServiceReply(c.pa.subject) {
checkNoInterest = false
} else {
Expand Down

0 comments on commit 68a17a4

Please sign in to comment.