mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
use a timeout in the HTTP client used for consul sd (#3303)
This commit is contained in:
parent
55a1311f6a
commit
45f9f3c539
|
@ -114,7 +114,10 @@ func NewDiscovery(conf *config.ConsulSDConfig, logger log.Logger) (*Discovery, e
|
||||||
conntrack.DialWithName("consul_sd"),
|
conntrack.DialWithName("consul_sd"),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
wrapper := &http.Client{Transport: transport}
|
wrapper := &http.Client{
|
||||||
|
Transport: transport,
|
||||||
|
Timeout: 30 * time.Second,
|
||||||
|
}
|
||||||
|
|
||||||
clientConf := &consul.Config{
|
clientConf := &consul.Config{
|
||||||
Address: conf.Server,
|
Address: conf.Server,
|
||||||
|
|
Loading…
Reference in a new issue