diff options
author | Valery Piashchynski <[email protected]> | 2021-07-12 12:55:04 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-12 12:55:04 +0300 |
commit | 0be3e79115345d13e92da9b8a4e2b0926480c138 (patch) | |
tree | db4349931ad1230357377ef816bc54c0eee754d6 /plugins | |
parent | aa1437d24ac215bec7fe053b06fa4773c9b1b1ad (diff) |
Return proper error type in the redial
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/jobs/brokers/amqp/redial.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/jobs/brokers/amqp/redial.go b/plugins/jobs/brokers/amqp/redial.go index 571ee548..6ce69ed9 100644 --- a/plugins/jobs/brokers/amqp/redial.go +++ b/plugins/jobs/brokers/amqp/redial.go @@ -1,7 +1,6 @@ package amqp import ( - "fmt" "time" "github.com/cenkalti/backoff/v4" @@ -45,7 +44,7 @@ func (j *JobsConsumer) redialer() { //nolint:gocognit var dialErr error j.conn, dialErr = amqp.Dial(j.connStr) if dialErr != nil { - return fmt.Errorf("fail to dial server endpoint: %v", dialErr) + return errors.E(op, dialErr) } j.log.Info("rabbitmq dial succeed. trying to redeclare queues and subscribers") |