Skip to content

Commit

Permalink
checking error on route.Route
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar committed Sep 26, 2024
1 parent 3b174b8 commit 22ed801
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion internal/tss/channels/error_jitter_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ func (p *errorJitterPool) Receive(payload tss.Payload) {
if i == p.MaxRetries {
// Retry limit reached, route the payload to the router so it can re-route it to this pool and keep re-trying
// NOTE: Is this a good idea? Infinite tries per transaction ?
p.Router.Route(payload)
err := p.Router.Route(payload)
if err != nil {
log.Errorf("%s: Unable to route payload: %e", ErrorJitterChannelName, err)
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion internal/tss/channels/error_non_jitter_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ func (p *errorNonJitterPool) Receive(payload tss.Payload) {
if i == p.MaxRetries {
// Retry limit reached, route the payload to the router so it can re-route it to this pool and keep re-trying
// NOTE: Is this a good idea?
p.Router.Route(payload)
err := p.Router.Route(payload)
if err != nil {
log.Errorf("%s: Unable to route payload: %e", ErrorNonJitterChannelName, err)
return
}
}
}

Expand Down

0 comments on commit 22ed801

Please sign in to comment.