Browse Source

use a timeout in the HTTP client used for consul sd (#3303)

pull/3330/head
Callum Styan 7 years ago committed by Brian Brazil
parent
commit
45f9f3c539
  1. 5
      discovery/consul/consul.go

5
discovery/consul/consul.go

@ -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…
Cancel
Save