Skip to content

Commit

Permalink
#74 fix for connections leak when no Connection Pool used, null check
Browse files Browse the repository at this point in the history
  • Loading branch information
doom369 committed Dec 3, 2019
1 parent e022810 commit 844615a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ public InputStream post(List<ClickHouseExternalData> externalData, URI uri) thro

@Override
public void close() {
this.httpURLConnection.disconnect();
if (this.httpURLConnection != null) {
this.httpURLConnection.disconnect();
}
}

private void sendPostRequest(String sql, List<byte[]> batches, HttpURLConnection connection)
Expand Down

0 comments on commit 844615a

Please sign in to comment.