mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-23 23:55:02 +01:00
Merge pull request #316 from getAlby/catch-add-index-error
Invoice subscription: safety improvements
This commit is contained in:
5
main.go
5
main.go
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user