Skip to content

Commit 59a9b0a

Browse files
authored
Merge pull request #79 from junjie-bianjie/master
Close okHttp connection
2 parents 5b3e45d + fa10b34 commit 59a9b0a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.bianjieai</groupId>
88
<artifactId>opb-sdk</artifactId>
9-
<version>0.1.12-rc2</version>
9+
<version>0.1.12-rc3</version>
1010
<url>https://github.com/bianjieai/opb-sdk-java</url>
1111
<name>opb-sdk</name>
1212
<licenses>

src/main/java/irita/sdk/util/HttpClientGetServerCertificate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public static X509Certificate[] getGateWayTlsCertPool(String gateWayUrl) {
2323
response = client.newCall(request).execute();
2424
} catch (IOException e) {
2525
throw new IritaSDKException(String.format("connect to url:%s failed, %s", gateWayUrl, e.getMessage()));
26+
} finally {
27+
if (response != null) response.close();
2628
}
2729
Handshake handshake = response.handshake();
2830
if (handshake == null) {

0 commit comments

Comments
 (0)