Don't create a new invoice for each attempt

only do it for timed out ones
pull/1/head
rkfg 2 years ago
parent f083e7ebbc
commit 2e98c46eb0

@ -219,12 +219,12 @@ func main() {
attemptCancel()
if attemptCtx.Err() == context.DeadlineExceeded {
log.Print(errColor("Attempt timed out"))
invoice = nil // create a new invoice next time
}
if mainCtx.Err() == context.DeadlineExceeded {
log.Println(errColor("Rebalancing timed out"))
return
}
invoice = nil // create a new invoice next time
if !retry {
return
}

Loading…
Cancel
Save