Skip to content

Commit 0b32c81

Browse files
committed
Fixes issue hubert-marteau#28 in which the Response Entity was not getting consumed when there was an error, so the Pool would fill up and the library would sieze.
1 parent 6314e72 commit 0b32c81

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)