mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-26 15:16:15 +01:00
Increase default timeout
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user