mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-05 22:52:24 -04:00
use a timeout in the HTTP client used for consul sd (#3303)
This commit is contained in:
parent
55a1311f6a
commit
45f9f3c539
1 changed files with 4 additions and 1 deletions
|
|
@ -114,7 +114,10 @@ func NewDiscovery(conf *config.ConsulSDConfig, logger log.Logger) (*Discovery, e
|
|||
conntrack.DialWithName("consul_sd"),
|
||||
),
|
||||
}
|
||||
wrapper := &http.Client{Transport: transport}
|
||||
wrapper := &http.Client{
|
||||
Transport: transport,
|
||||
Timeout: 30 * time.Second,
|
||||
}
|
||||
|
||||
clientConf := &consul.Config{
|
||||
Address: conf.Server,
|
||||
|
|
|
|||
Loading…
Reference in a new issue