diff --git a/server/client.go b/server/client.go index ef8f41ca25b..df7f6326481 100644 --- a/server/client.go +++ b/server/client.go @@ -2050,10 +2050,11 @@ func (c *client) checkForImportServices(acc *Account, msg []byte) { } acc.mu.RLock() rm := acc.imports.services[string(c.pa.subject)] + invalid := rm != nil && rm.invalid acc.mu.RUnlock() // Get the results from the other account for the mapped "to" subject. // If we have been marked invalid simply return here. - if rm != nil && !rm.invalid && rm.acc != nil && rm.acc.sl != nil { + if rm != nil && !invalid && rm.acc != nil && rm.acc.sl != nil { var nrr []byte if rm.ae { acc.removeServiceImport(rm.from)