From 4ee6e4bf7a56d23e7cdb19a6414d6c0cc9707f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 1 Dec 2023 23:06:21 +0100 Subject: [PATCH] lpmessage: fix unused error lint --- provider/lpmessage/sender.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/provider/lpmessage/sender.go b/provider/lpmessage/sender.go index fe47f7f00..8d6cd4027 100644 --- a/provider/lpmessage/sender.go +++ b/provider/lpmessage/sender.go @@ -114,13 +114,13 @@ func (s *SendTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done b // defer release db send lock defer func() { - _, err := s.db.Exec(ctx, `delete from message_send_locks where from_key = $1 and task_id = $2`, dbMsg.FromKey, taskID) - if err != nil { - log.Errorw("releasing send lock", "task_id", taskID, "from", dbMsg.FromKey, "error", err) + _, err2 := s.db.Exec(ctx, `delete from message_send_locks where from_key = $1 and task_id = $2`, dbMsg.FromKey, taskID) + if err2 != nil { + log.Errorw("releasing send lock", "task_id", taskID, "from", dbMsg.FromKey, "error", err2) // make sure harmony retries this task so that we eventually release this lock done = false - err = multierr.Append(err, xerrors.Errorf("releasing send lock: %w", err)) + err = multierr.Append(err, xerrors.Errorf("releasing send lock: %w", err2)) } }()