Merge pull request #316 from getAlby/catch-add-index-error

Invoice subscription: safety improvements
This commit is contained in:
kiwiidb
2023-02-22 17:35:19 +01:00
committed by GitHub
5 changed files with 24 additions and 10 deletions

View File

@@ -179,8 +179,9 @@ func main() {
backgroundWg.Add(1)
go func() {
err = svc.InvoiceUpdateSubscription(backGroundCtx)
if err != nil {
svc.Logger.Error(err)
if err != nil && err != context.Canceled {
// in case of an error in this routine, we want to restart LNDhub
svc.Logger.Fatal(err)
}
svc.Logger.Info("Invoice routine done")
backgroundWg.Done()