Skip to content

Commit 0a3b6cd

Browse files
committed
ethreceipts: add small delay for retrial
1 parent 869642d commit 0a3b6cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethreceipts/subscription.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ func (s *subscriber) retryPendingReceipts(ctx context.Context) {
367367
// If context is cancelled, release the claim so the item can be retried later.
368368
s.retryMu.Lock()
369369
if current, ok := s.pendingReceipts[p.receipt.TransactionHash()]; ok && current == p {
370-
current.nextRetryAt = time.Now() // Reschedule immediately.
370+
current.nextRetryAt = time.Now().Add(100 * time.Millisecond) // small delay to avoid immediate retry
371371
}
372372
s.retryMu.Unlock()
373373
return

0 commit comments

Comments
 (0)