Improve timeout in input plugins
This commit is contained in:
committed by
Cameron Sparr
parent
ea7cbc781e
commit
7416d6ea71
@@ -177,8 +177,11 @@ func (r *Raindrops) getTags(addr *url.URL) map[string]string {
|
||||
|
||||
func init() {
|
||||
inputs.Add("raindrops", func() telegraf.Input {
|
||||
return &Raindrops{http_client: &http.Client{Transport: &http.Transport{
|
||||
ResponseHeaderTimeout: time.Duration(3 * time.Second),
|
||||
}}}
|
||||
return &Raindrops{http_client: &http.Client{
|
||||
Transport: &http.Transport{
|
||||
ResponseHeaderTimeout: time.Duration(3 * time.Second),
|
||||
},
|
||||
Timeout: time.Duration(4 * time.Second),
|
||||
}}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user