mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-10 04:30:20 +02:00
hotfix(publicip): increase client timeouts from 5s to 15s
This commit is contained in:
@@ -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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
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) {
|
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
|
// Define a timeout since the default client has a large timeout and we don't
|
||||||
// want to wait too long.
|
// want to wait too long.
|
||||||
const timeout = 5 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user