Skip to content

Commit

Permalink
fix keepalive will not handle kick situation
Browse files Browse the repository at this point in the history
close #58
  • Loading branch information
zyxkad committed Apr 11, 2024
1 parent 5e7f491 commit 0d0aa98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,9 @@ func (cr *Cluster) KeepAlive(ctx context.Context) (ok bool) {
log.Errorf(Tr("error.cluster.keepalive.failed"), ero)
return false
}
kicked := data[1] == false
log.Infof(Tr("info.cluster.keepalive.success"), hits, utils.BytesToUnit((float64)(hbts)), data[1])
return true
return !kicked
}

func (cr *Cluster) disconnected() bool {
Expand Down

0 comments on commit 0d0aa98

Please sign in to comment.