Skip to content

Commit

Permalink
do not drop inner retry error
Browse files Browse the repository at this point in the history
  • Loading branch information
loongy committed Sep 2, 2020
1 parent 50cd544 commit 526dba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chain/bitcoin/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func retry(ctx context.Context, dur time.Duration, f func() error) error {
log.Printf("retrying: %v", err)
select {
case <-ctx.Done():
return ctx.Err()
return fmt.Errorf("%v: %v", ctx.Err(), err)
case <-ticker.C:
err = f()
}
Expand Down

0 comments on commit 526dba6

Please sign in to comment.