Skip to content

Commit 4b83b6f

Browse files
committed
2 parents f3e7ed9 + ecfe56c commit 4b83b6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

splunk/splunk.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ func (c *Client) doRequest(b *bytes.Buffer) error {
163163
// If statusCode is not good, return error string
164164
switch res.StatusCode {
165165
case 200:
166+
// need to read the reply otherwise the connection hangs
167+
buf := new(bytes.Buffer)
168+
buf.ReadFrom(res.Body)
169+
166170
return nil
167171
default:
168172
// Turn response into string and return it

0 commit comments

Comments
 (0)