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