Skip to content

Commit

Permalink
Bug Fix: projectdanube#46
Browse files Browse the repository at this point in the history
  • Loading branch information
kvats committed Apr 22, 2016
1 parent be1aff1 commit 9802edc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/main/java/xdi2/client/impl/http/XDIHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ public void close() {
}

private HttpURLConnection connect() throws Xdi2ClientException, IOException {

if (this.getHttpURLConnection() != null) return this.getHttpURLConnection();
//Bug Fix : https://github.com/projectdanube/xdi2/issues/46
//For each request we should have a new object of HttpURLConnection, it should not be shared across requests.
//if (this.getHttpURLConnection() != null) return this.getHttpURLConnection();

if (this.getXdiEndpointUri() == null) throw new Xdi2ClientException("No URL to connect to.");

Expand Down Expand Up @@ -325,8 +326,8 @@ private HttpURLConnection connect() throws Xdi2ClientException, IOException {
// done

if (log.isDebugEnabled()) log.debug("Connected successfully.");

this.setHttpURLConnection(httpURLConnection);
//Bug Fix : https://github.com/projectdanube/xdi2/issues/46
//this.setHttpURLConnection(httpURLConnection);
return httpURLConnection;
}

Expand Down

0 comments on commit 9802edc

Please sign in to comment.