1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-11 20:15:03 -05:00

Forgot closing a reader.

This commit is contained in:
Sander Bogaert 2012-04-28 13:50:19 +02:00 committed by Andrew Chen
parent 74b5d777f1
commit b7673fc481

View File

@ -175,12 +175,10 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
// get the data // get the data
String tmp, line; String tmp, line;
BufferedReader reader; BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
tmp = ""; tmp = "";
try{ try{
reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while( (line = reader.readLine()) != null) while( (line = reader.readLine()) != null)
tmp += line; tmp += line;
@ -192,8 +190,10 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
catch (ConnectException ex){ catch (ConnectException ex){
// ignore this, it just means the url doesn't exist which happens often, we test for it! // ignore this, it just means the url doesn't exist which happens often, we test for it!
} }
finally finally{
{ conn.disconnect(); } reader.close();
conn.disconnect();
}
return tmp; return tmp;
} }