Skip to content

Commit

Permalink
fix: fix 877
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleiphir2769 committed Jul 8, 2023
1 parent 43986b1 commit e5a8464
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -1095,9 +1095,13 @@ func (p *partitionProducer) Send(ctx context.Context, msg *ProducerMessage) (Mes
}, true)

// wait for send request to finish
<-doneCh

return msgID, err
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-doneCh:
// send request has been finished
return msgID, err
}
}

func (p *partitionProducer) SendAsync(ctx context.Context, msg *ProducerMessage,
Expand Down

0 comments on commit e5a8464

Please sign in to comment.