add minimal fix for connection reuse issue - @tgruben has a more complete fix

This commit is contained in:
Matt Jaffee 2020-02-29 13:41:49 -06:00
parent b99bdb8169
commit f0f86500c7
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF

View file

@ -1121,7 +1121,9 @@ func (c *InternalClient) SendMessage(ctx context.Context, uri *pilosa.URI, msg [
if err != nil {
return errors.Wrap(err, "executing request")
}
return errors.Wrap(resp.Body.Close(), "closing response body")
defer resp.Body.Close()
_, err = io.Copy(ioutil.Discard, resp.Body)
return errors.Wrap(err, "draining SendMessage response body")
}
// TranslateKeysNode sends a key translation request to a specific node.