From 90fcde0e26cb4dc3c64359451e36b7b26da87169 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 5 Feb 2024 17:47:34 -0800 Subject: [PATCH] report EOF error --- weed/mq/client/pub_client/scheduler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/mq/client/pub_client/scheduler.go b/weed/mq/client/pub_client/scheduler.go index 39a659635..a766814e6 100644 --- a/weed/mq/client/pub_client/scheduler.go +++ b/weed/mq/client/pub_client/scheduler.go @@ -161,8 +161,8 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro for { ackResp, err := publishClient.Recv() if err != nil { - e, ok := status.FromError(err) - if ok && e.Code() == codes.Unknown && e.Message() == "EOF" { + e, _ := status.FromError(err) + if e.Code() == codes.Unknown && e.Message() == "EOF" { return } publishClient.Err = err