From dc6a62c0555d67dd71a0e1a946f5809110b3f0f2 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Fri, 5 Jan 2024 15:43:32 +0700 Subject: [PATCH] fix: add check for relay connection error --- service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service.go b/service.go index 871d9966..5efa4b1f 100644 --- a/service.go +++ b/service.go @@ -129,6 +129,10 @@ func (svc *Service) StartSubscription(ctx context.Context, sub *nostr.Subscripti }() <-ctx.Done() + if sub.Relay.ConnectionError != nil { + svc.Logger.Errorf("Relay error %v", ctx.Err()) + return sub.Relay.ConnectionError + } if ctx.Err() != context.Canceled { svc.Logger.Errorf("Subscription error %v", ctx.Err()) return ctx.Err()