Skip to content

Commit

Permalink
fix: continue replacing other messages when a message is not found in…
Browse files Browse the repository at this point in the history
… mpool (#14)
  • Loading branch information
strahe authored Jun 5, 2024
1 parent bfa2e47 commit eabffa1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,10 @@ func (s *Service) replaceMessage(ctx context.Context, id uint, mss *api.MessageS
}
}

// If the message is not found in the mpool, skip it and continue with the next one
if found == nil {
return fmt.Errorf("no pending message found from %s with nonce %d", cm.From, cm.Nonce)
sLog.Warn("message not found in mpool, skipping")
return nil
}
msg := found.Message

Expand Down

0 comments on commit eabffa1

Please sign in to comment.