Skip to content

Commit aeae643

Browse files
committed
Added retry of the GetAllPeers status check.
1 parent 74f253d commit aeae643

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

shared/connection.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,15 @@ func (m *Conn) GetAllPeerStatus() {
863863

864864
// Get the node status for all nodes in the cluster
865865
for k, v := range m.nodeMap {
866-
status, err := m.getNodeStatusForIndex(v)
866+
var status *pb.StatusMessage
867+
err := Retry(5, 5 * time.Second, func() (err error) {
868+
var errx error
869+
status, err = m.getNodeStatusForIndex(v)
870+
if errx != nil {
871+
err = errx
872+
}
873+
return
874+
})
867875

868876
// u.Debug("GetAllPeerStatus getNodeStatusForIndex", m.owner, k, v, status.NodeState)
869877
if err == nil {

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
quanta 0.9.16-rc-3
1+
quanta 0.9.16-rc-4
22

33

0 commit comments

Comments
 (0)