Increase default timeout

This commit is contained in:
CrazyMax
2019-06-04 23:20:46 +02:00
parent 0246d54711
commit 6cb9c6bb2c
3 changed files with 2 additions and 4 deletions

View File

@@ -157,7 +157,7 @@ items:
* `watch_repo`: Watch all tags of this `image` repository (default: `false`).
* `include_tags`: List of regular expressions to include tags. Can be useful if you use `watch_repo`.
* `exclude_tags`: List of regular expressions to exclude tags. Can be useful if you use `watch_repo`.
* `timeout`: Timeout is the maximum amount of time for the TCP connection to establish (default: `5`).
* `timeout`: Timeout is the maximum amount of time for the TCP connection to establish. 0 means no timeout (default: `10`).
## Docker

View File

@@ -117,7 +117,7 @@ func (cfg *Config) Check() error {
}
if err := mergo.Merge(&cfg.Items[key], model.Item{
Timeout: 5,
Timeout: 10,
}); err != nil {
return err
}

View File

@@ -31,8 +31,6 @@ func (c *Client) timeoutContext(timeout time.Duration) (context.Context, context
var cancel context.CancelFunc = func() {}
if timeout > 0 {
ctx, cancel = context.WithTimeout(ctx, timeout)
} else {
ctx, cancel = context.WithTimeout(ctx, 5*time.Second)
}
return ctx, cancel
}