Fix pool manager crash problem if failed at http call (#418)

This commit is contained in:
Ta-Ching Chen
2017-11-30 13:40:17 -08:00
committed by Soam Vasani
parent 140b132c8e
commit 49169e672d
+1 -1
View File
@@ -36,7 +36,7 @@ func (c *Client) Fetch(fr *fetcher.FetchRequest) error {
var resp *http.Response
for i := 0; i < maxRetries; i++ {
resp, err := http.Post(c.url, "application/json", bytes.NewReader(body))
resp, err = http.Post(c.url, "application/json", bytes.NewReader(body))
if err == nil && resp.StatusCode == 200 {
defer resp.Body.Close()