mirror of https://github.com/prometheus/prometheus
use a timeout in the HTTP client used for consul sd (#3303)
parent
55a1311f6a
commit
45f9f3c539
|
@ -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 New Issue