use bg ctx / capture error

This commit is contained in:
kiwiidb
2023-02-20 14:32:36 +01:00
parent 0b8828c93b
commit 945d936146
2 changed files with 10 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ func (svc *LndhubService) StartRabbitMqPublisher(ctx context.Context) error {
for {
select {
case <-ctx.Done():
return fmt.Errorf("context canceled")
return context.Canceled
case incoming := <-incomingInvoices:
svc.publishInvoice(ctx, incoming, ch)
case outgoing := <-outgoingInvoices: