Skip to content

Commit

Permalink
Merge pull request #5 from prochac/patch-1
Browse files Browse the repository at this point in the history
Update subscriber.go
  • Loading branch information
m110 authored May 14, 2021
2 parents e9b9574 + f191648 commit af17ba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/amqp/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ func (s *Subscriber) runSubscriber(
return
}
defer func() {
err := channel.Close()
s.logger.Error("Failed to close channel", err, logFields)
if err := channel.Close(); err != nil {
s.logger.Error("Failed to close channel", err, logFields)
}
}()

notifyCloseChannel := channel.NotifyClose(make(chan *amqp.Error))
Expand Down

0 comments on commit af17ba1

Please sign in to comment.