From ca2ab6183b8d53caa480572fdadfefcc8008a039 Mon Sep 17 00:00:00 2001 From: Maxim Epishchev Date: Thu, 18 Feb 2016 11:33:26 +0300 Subject: Properly close connections to avoid TCP CLOSE_WAIT Using HttpMethodBase.releaseConnection() for this stuff. --- .../bitbucketpullrequestbuilder/bitbucket/ApiClient.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java index 19bff34..c8dfeb2 100644 --- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java +++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java @@ -244,6 +244,8 @@ public class ApiClient { } catch (IOException e) { logger.log(Level.WARNING, "Failed to send request.", e); e.printStackTrace(); + } finally { + req.releaseConnection(); } return null; } -- cgit v1.2.3