Skip to content

Commit

Permalink
Fix Tracker close on txm
Browse files Browse the repository at this point in the history
  • Loading branch information
dimriou committed Nov 29, 2023
1 parent 634676c commit 9d28014
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9d28014

Please sign in to comment.