From 93999062e443e254d3fb15e51bd714a0513bc735 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 10 Mar 2026 12:26:40 +0000 Subject: [PATCH] hotfix(publicip): increase client timeouts from 5s to 15s --- internal/publicip/api/cloudflare.go | 2 +- internal/publicip/api/echoip.go | 2 +- internal/publicip/api/ip2location.go | 2 +- internal/publicip/api/ipinfo.go | 2 +- internal/version/github.go | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/publicip/api/cloudflare.go b/internal/publicip/api/cloudflare.go index e9e7b3cc..80dbba00 100644 --- a/internal/publicip/api/cloudflare.go +++ b/internal/publicip/api/cloudflare.go @@ -43,7 +43,7 @@ func (c *cloudflare) FetchInfo(ctx context.Context, ip netip.Addr) ( ) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() diff --git a/internal/publicip/api/echoip.go b/internal/publicip/api/echoip.go index bad3ed75..7be70520 100644 --- a/internal/publicip/api/echoip.go +++ b/internal/publicip/api/echoip.go @@ -47,7 +47,7 @@ func (e *echoip) FetchInfo(ctx context.Context, ip netip.Addr) ( ) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() diff --git a/internal/publicip/api/ip2location.go b/internal/publicip/api/ip2location.go index 58b50102..4bf29304 100644 --- a/internal/publicip/api/ip2location.go +++ b/internal/publicip/api/ip2location.go @@ -47,7 +47,7 @@ func (i *ip2Location) FetchInfo(ctx context.Context, ip netip.Addr) ( ) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() diff --git a/internal/publicip/api/ipinfo.go b/internal/publicip/api/ipinfo.go index 89ba7d59..e5651f47 100644 --- a/internal/publicip/api/ipinfo.go +++ b/internal/publicip/api/ipinfo.go @@ -45,7 +45,7 @@ func (i *ipInfo) FetchInfo(ctx context.Context, ip netip.Addr) ( ) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() diff --git a/internal/version/github.go b/internal/version/github.go index 1ab6fb67..15aa4ee2 100644 --- a/internal/version/github.go +++ b/internal/version/github.go @@ -30,7 +30,7 @@ var errHTTPStatusCode = errors.New("bad response HTTP status code") func getGithubReleases(ctx context.Context, client *http.Client) (releases []githubRelease, err error) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() @@ -61,7 +61,7 @@ func getGithubReleases(ctx context.Context, client *http.Client) (releases []git func getGithubCommits(ctx context.Context, client *http.Client) (commits []githubCommit, err error) { // Define a timeout since the default client has a large timeout and we don't // want to wait too long. - const timeout = 5 * time.Second + const timeout = 15 * time.Second ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel()