Skip to content

Commit

Permalink
Merge pull request square#254 from square/jw/close-shop
Browse files Browse the repository at this point in the history
Disconnect the connection if we are existing early.
  • Loading branch information
dnkoutso committed Sep 12, 2013
2 parents 1c7bc76 + df5c14e commit 937040b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected OkHttpClient getClient() {

int responseCode = connection.getResponseCode();
if (responseCode >= 300) {
connection.disconnect();
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected HttpURLConnection openConnection(Uri path) throws IOException {

int responseCode = connection.getResponseCode();
if (responseCode >= 300) {
connection.disconnect();
return null;
}

Expand Down

0 comments on commit 937040b

Please sign in to comment.