From 0d0aa98bf732ec51702dd8ff27e8321dc620db53 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Thu, 11 Apr 2024 06:33:33 -0600 Subject: [PATCH] fix keepalive will not handle kick situation close #58 --- cluster.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster.go b/cluster.go index fb81e228..e8288eb1 100644 --- a/cluster.go +++ b/cluster.go @@ -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 {