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