From 1e7fea6202ce03c718e60b24193b9209df445150 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Fri, 22 Sep 2023 16:46:29 -0700 Subject: [PATCH] client is often nil --- cmd/bigsky/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/bigsky/main.go b/cmd/bigsky/main.go index cebccc8ab..2fa5f595f 100644 --- a/cmd/bigsky/main.go +++ b/cmd/bigsky/main.go @@ -20,6 +20,7 @@ import ( "github.com/bluesky-social/indigo/notifs" "github.com/bluesky-social/indigo/plc" "github.com/bluesky-social/indigo/repomgr" + "github.com/bluesky-social/indigo/util" "github.com/bluesky-social/indigo/util/cliutil" "github.com/bluesky-social/indigo/util/version" "github.com/bluesky-social/indigo/xrpc" @@ -284,6 +285,9 @@ func Bigsky(cctx *cli.Context) error { rlskip := os.Getenv("BSKY_SOCIAL_RATE_LIMIT_SKIP") ix.ApplyPDSClientSettings = func(c *xrpc.Client) { if c.Host == "https://bsky.social" { + if c.Client == nil { + c.Client = util.RobustHTTPClient() + } c.Client.Timeout = time.Minute * 30 if rlskip != "" { c.Headers = map[string]string{