mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Mark raft node as offline when server is removed
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -866,6 +866,15 @@ func (s *Server) processRemoteServerShutdown(sid string) {
|
||||
v.(*Account).removeRemoteServer(sid)
|
||||
return true
|
||||
})
|
||||
// Update any state in nodeInfo.
|
||||
s.nodeToInfo.Range(func(k, v interface{}) bool {
|
||||
si := v.(*nodeInfo)
|
||||
if si.id == sid {
|
||||
si.offline = true
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// remoteServerShutdownEvent is called when we get an event from another server shutting down.
|
||||
|
||||
Reference in New Issue
Block a user