Disable retryKeepAlive when LivenessCheck's Context close (#25161)

Signed-off-by: wayblink <anyang.wang@zilliz.com>
This commit is contained in:
wayblink 2023-06-27 17:08:45 +08:00 committed by GitHub
parent 29b9b26de8
commit b7ecb7f56b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -784,6 +784,7 @@ func (s *Session) LivenessCheck(ctx context.Context, callback func()) {
return return
case <-ctx.Done(): case <-ctx.Done():
log.Debug("liveness exits due to context done") log.Debug("liveness exits due to context done")
s.enableRetryKeepAlive = false
// cancel the etcd keepAlive context // cancel the etcd keepAlive context
if s.keepAliveCancel != nil { if s.keepAliveCancel != nil {
s.keepAliveCancel() s.keepAliveCancel()