Skip to content

Commit

Permalink
Merge pull request #5 from tp-tc/error-on-connect-failure
Browse files Browse the repository at this point in the history
Propagate the error on connect failure.
  • Loading branch information
petemoore authored Apr 21, 2020
2 parents 79f6799 + 68b8db3 commit 515edd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pulse/pulse.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ func (c *Connection) Consume(

// TODO: this needs to be synchronised
if !c.connected {
c.connect()
if err := c.connect(); err != nil {
return pulseQueue, Error(err, "Failed to connect to pulse")
}
}

ch, err := c.AMQPConn.Channel()
Expand Down

0 comments on commit 515edd0

Please sign in to comment.