From 9d28014d16155feabf292aa562cfc93b06dd35e6 Mon Sep 17 00:00:00 2001 From: Dimitris Date: Wed, 29 Nov 2023 13:57:10 +0200 Subject: [PATCH] Fix Tracker close on txm --- common/txmgr/txmgr.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/txmgr/txmgr.go b/common/txmgr/txmgr.go index 2c6f9c90bca..0a50bb66385 100644 --- a/common/txmgr/txmgr.go +++ b/common/txmgr/txmgr.go @@ -410,8 +410,9 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) runLoop() if err != nil && (!errors.Is(err, services.ErrAlreadyStopped) || !errors.Is(err, services.ErrCannotStopUnstarted)) { b.logger.Errorw(fmt.Sprintf("Failed to Close Confirmer: %v", err), "err", err) } - if err := utils.EnsureClosed(b.tracker); err != nil { - b.logger.Panicw(fmt.Sprintf("Failed to Close Tracker: %v", err), "err", err) + err = b.tracker.Close() + if err != nil && (!errors.Is(err, services.ErrAlreadyStopped) || !errors.Is(err, services.ErrCannotStopUnstarted)) { + b.logger.Errorw(fmt.Sprintf("Failed to Close Tracker: %v", err), "err", err) } return case <-keysChanged: