Browse Source

runs consumer reconnection by any rabbit error

pull/62/head
Fedor Ortyanov 4 years ago
parent
commit
5aa86a5497
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      channel.go

+ 1
- 2
channel.go View File

@ -59,8 +59,7 @@ func (chManager *channelManager) startNotifyCancelOrClosed() {
select { select {
case err := <-notifyCloseChan: case err := <-notifyCloseChan:
// If the connection close is triggered by the Server, a reconnection takes place
if err != nil && err.Server {
if err != nil {
chManager.logger.Printf("attempting to reconnect to amqp server after close") chManager.logger.Printf("attempting to reconnect to amqp server after close")
chManager.reconnectWithBackoff() chManager.reconnectWithBackoff()
chManager.logger.Printf("successfully reconnected to amqp server after close") chManager.logger.Printf("successfully reconnected to amqp server after close")


Loading…
Cancel
Save