From 6a33c359c7f8c64813b42f788b58cd940d4529b5 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Tue, 17 Sep 2024 17:33:55 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Minor=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 1 + requests/run.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/main.go b/main.go index da8aae0..1b5baec 100644 --- a/main.go +++ b/main.go @@ -106,6 +106,7 @@ func main() { return } else if customerrors.Is(err, customerrors.ErrNoInternet) { utils.PrintAndExit("No internet connection") + return } panic(err) } diff --git a/requests/run.go b/requests/run.go index 7e6af17..c1ae2bc 100644 --- a/requests/run.go +++ b/requests/run.go @@ -40,6 +40,9 @@ func Run(ctx context.Context, requestConfig *config.RequestConfig) (Responses, e requestConfig.Yes, requestConfig.URL, ) + if clients == nil { + return nil, customerrors.ErrInterrupt + } responses := releaseDodos(ctx, requestConfig, clients) if ctx.Err() != nil && len(responses) == 0 {