mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge branch 'main' into dev
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user