Skip to content

Commit

Permalink
client is often nil
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Sep 22, 2023
1 parent 71bfc4a commit 2091cbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/bigsky/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 2091cbc

Please sign in to comment.