Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
return error instead of log.Fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Feb 9, 2023
1 parent 9c246a4 commit b9b6a99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@ func (m *AMQPMessenger) createNewChannel() error {
confirmsChan := make(chan amqp.Confirmation, 1)
if err := c.Confirm(false); err != nil {
close(confirmsChan)
log.Fatalf("Channel could not be put into confirm mode: %s\n", err)

return fmt.Errorf("channel could not be put into confirm mode: %v", err)
}
log.Debugln("recconected to new channel")
log.Debugln("reconnected to new channel")
m.channel = c
m.confirmsChan = c.NotifyPublish(confirmsChan)

Expand Down

0 comments on commit b9b6a99

Please sign in to comment.