Fix for cluster info with R=1

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2021-01-23 10:04:43 -08:00
parent ecb6e78708
commit cb2433c2fc

View File

@@ -2910,7 +2910,10 @@ func (mset *Stream) handleClusterSyncRequest(sub *subscription, c *client, subje
// clusterInfo will report on the status of the raft group.
func (s *Server) clusterInfo(n RaftNode) *ClusterInfo {
if n == nil {
return nil
return &ClusterInfo{
Name: s.ClusterName(),
Leader: s.Name(),
}
}
ci := &ClusterInfo{