Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjindong committed Mar 10, 2023
1 parent 2499f30 commit c6f9832
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions broker/amqp/amqp.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ func (b *Broker) watch(ctx context.Context) {
<-seat
wg.Add(1)
go func() {
_ = b.process(ctx, data)
_ = data.Ack(false)
if err := b.process(ctx, data); err != nil {
_ = data.Nack(false, true)
} else {
_ = data.Ack(false)
}
wg.Done()
seat <- struct{}{}
}()
Expand Down

0 comments on commit c6f9832

Please sign in to comment.