From 38f81f82980041bb5c360a2a490302422551c184 Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Thu, 13 Feb 2020 18:04:13 +0000 Subject: [PATCH] Updated "retrying" log message when BackoffFunc implemented The "client/metadata retrying" log message was always reporting the sleep duration as `config.Metadata.Retry.Backoff`, regardless of whether `config.Metadata.Retry.BackoffFunc` is implemented. We now report the actual retry time before sleeping. --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 057a57a2b..81a3ca5b5 100644 --- a/client.go +++ b/client.go @@ -798,7 +798,7 @@ func (client *client) tryRefreshMetadata(topics []string, attemptsRemaining int, Logger.Println("client/metadata skipping last retries as we would go past the metadata timeout") return err } - Logger.Printf("client/metadata retrying after %dms... (%d attempts remaining)\n", client.conf.Metadata.Retry.Backoff/time.Millisecond, attemptsRemaining) + Logger.Printf("client/metadata retrying after %dms... (%d attempts remaining)\n", backoff/time.Millisecond, attemptsRemaining) if backoff > 0 { time.Sleep(backoff) }