1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04: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
String tmp, line;
BufferedReader reader;
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
tmp = "";
try{
reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while( (line = reader.readLine()) != null)
tmp += line;
@ -192,8 +190,10 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
catch (ConnectException ex){
// ignore this, it just means the url doesn't exist which happens often, we test for it!
}
finally
{ conn.disconnect(); }
finally{
reader.close();
conn.disconnect();
}
return tmp;
}