Skip to content

Commit 867a693

Browse files
ndyakovCopilot
andauthored
Update osscluster.go
Co-authored-by: Copilot <[email protected]>
1 parent 49c07d1 commit 867a693

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

osscluster.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,11 @@ func (n *clusterNode) Loading() bool {
461461
defer cancel()
462462

463463
err := n.Client.Ping(ctx).Err()
464-
loading := err != nil && isLoadingError(err)
465-
if loading == false {
464+
if err == nil {
466465
atomic.StoreUint32(&n.loaded, 1)
466+
return false
467467
}
468+
loading := isLoadingError(err)
468469
return loading
469470
}
470471

0 commit comments

Comments
 (0)