Merge branch 'main' into dev

This commit is contained in:
Derek Collison
2023-05-15 15:44:38 -07:00
9 changed files with 447 additions and 88 deletions

View File

@@ -1363,6 +1363,13 @@ func (s *Server) remoteServerUpdate(sub *subscription, c *client, _ *Account, su
}
si := ssm.Server
// Should do normal updates before bailing if wrong domain.
s.mu.Lock()
if s.running && s.eventsEnabled() && ssm.Server.ID != s.info.ID {
s.updateRemoteServer(&si)
}
s.mu.Unlock()
// JetStream node updates.
if !s.sameDomain(si.Domain) {
return
@@ -1388,11 +1395,6 @@ func (s *Server) remoteServerUpdate(sub *subscription, c *client, _ *Account, su
stats,
false, si.JetStream,
})
s.mu.Lock()
if s.running && s.eventsEnabled() && ssm.Server.ID != s.info.ID {
s.updateRemoteServer(&si)
}
s.mu.Unlock()
}
// updateRemoteServer is called when we have an update from a remote server.