Skip to content

Commit

Permalink
Restore the AMQP queue if needed after a connection failure.
Browse files Browse the repository at this point in the history
Closes #503.
  • Loading branch information
brocaar committed Oct 19, 2021
1 parent 4e7fdb3 commit 762d189
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/backend/gateway/amqp/amqp.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ func (b *Backend) eventLoop() {
// (in the loop).
log.WithError(err).Error("gateway/amqp: event loop error")
time.Sleep(time.Second)

// Restore the queue if needed.
if err := b.setupQueue(); err != nil {
log.WithError(err).Error("gateway/amqp: setup queue error")
}
}
}
}
Expand Down

0 comments on commit 762d189

Please sign in to comment.