mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-22 23:25:26 +01:00
prevent EOF loop
This commit is contained in:
@@ -198,7 +198,10 @@ func (client *DefaultClient) SubscribeToLndInvoices(ctx context.Context, handler
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return context.Canceled
|
||||
case delivery := <-deliveryChan:
|
||||
case delivery, ok := <-deliveryChan:
|
||||
if !ok {
|
||||
return fmt.Errorf("Disconnected from RabbitMQ")
|
||||
}
|
||||
var invoice lnrpc.Invoice
|
||||
|
||||
err := json.Unmarshal(delivery.Body, &invoice)
|
||||
|
||||
Reference in New Issue
Block a user