Skip to content

Commit 403e409

Browse files
Merge pull request hubert-marteau#29 from kungfujoe/Issue28
Fixes issue hubert-marteau#28 in which the Response Entity was not getting consumed…
2 parents 6314e72 + 0b32c81 commit 403e409

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/multichain/command/builders/QueryBuilderCommon.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ private Object executeRequest() throws IOException, ClientProtocolException, Mul
195195
CloseableHttpResponse response = httpclient.execute(httppost);
196196
int statusCode = response.getStatusLine().getStatusCode();
197197
if (statusCode >= 400) {
198+
EntityUtils.consume(response.getEntity());
198199
throw new MultichainException("code :" + statusCode, "message : " + response.getStatusLine().getReasonPhrase());
199200
}
200201
HttpEntity entity = response.getEntity();

0 commit comments

Comments
 (0)