Skip to content

Commit

Permalink
closed connection to fix security bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
akalichety-hw committed Apr 29, 2024
1 parent 8fa6513 commit c17bb82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/hyperwallet/clientsdk/util/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ private BinaryResponse readBinaryResponse() throws IOException {
} catch (IOException e) {
response.setBinaryBody(getBinaryFromStream(connection.getErrorStream()));
}
return response;
finally {
connection.getInputStream().close();
return response;
}

}

private byte[] getBinaryFromStream(final InputStream is) {
Expand Down

0 comments on commit c17bb82

Please sign in to comment.