Fixed another IO not closed resource leak

This commit is contained in:
Anthony Restaino 2016-03-09 22:53:48 -05:00
parent ee6314f521
commit 2f8feead71

View File

@ -400,6 +400,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
if (connection.getResponseCode() >= HttpURLConnection.HTTP_MULT_CHOICE ||
connection.getResponseCode() < HttpURLConnection.HTTP_OK) {
Log.e(TAG, "Search API Responded with code: " + connection.getResponseCode());
connection.disconnect();
return cacheFile;
}
in = connection.getInputStream();