Initial approach to reconnect behavior.

This commit is contained in:
Lucas Rouckhout
2023-05-30 16:14:05 +02:00
parent 2d40875685
commit df5a1fcfce
2 changed files with 139 additions and 36 deletions

View File

@@ -256,11 +256,12 @@ func (client *DefaultClient) SubscribeToLndInvoices(ctx context.Context, handler
return err
}
client.logger.Info("Starting RabbitMQ consumer loop")
client.logger.Info("Starting RabbitMQ invoice consumer loop")
for {
select {
case <-ctx.Done():
return context.Canceled
case delivery, ok := <-deliveryChan:
if !ok {
return fmt.Errorf("Disconnected from RabbitMQ")