From 5c752df1947ceedadff1d981655895699a773b27 Mon Sep 17 00:00:00 2001 From: Crimson <39024757+crimson-gao@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:22:15 +0800 Subject: [PATCH] fix: consumer pull logs 3 times (#286) * fix: consumer pull logs 3 times * retract mod version --- consumer/consumer_client.go | 2 ++ go.mod | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/consumer/consumer_client.go b/consumer/consumer_client.go index 0c3515b3..3b6a3a0e 100644 --- a/consumer/consumer_client.go +++ b/consumer/consumer_client.go @@ -171,6 +171,8 @@ func (consumer *ConsumerClient) pullLogs(shardId int, cursor string) (gl *sls.Lo "tryTimes", retry+1) } time.Sleep(200 * time.Millisecond) + } else { + return gl, plm, nil } } // If you can't retry the log three times, it will return to empty list and start pulling the log cursor, diff --git a/go.mod b/go.mod index 6d10e73a..308126aa 100644 --- a/go.mod +++ b/go.mod @@ -46,4 +46,4 @@ require ( gopkg.in/yaml.v2 v2.2.8 // indirect ) -retract v0.1.73 +retract [v0.1.70, v0.1.78]