diff --git a/pkg/amqp/subscriber.go b/pkg/amqp/subscriber.go index 72e681c..9e15139 100644 --- a/pkg/amqp/subscriber.go +++ b/pkg/amqp/subscriber.go @@ -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))