handle NPE better for dev.gp.info #6686

in some cases the connection becomes null while you are interacting with it
This commit is contained in:
Nathan Freitas 2016-02-22 15:07:40 -05:00
parent 00f82f0913
commit e9d28a4445
1 changed files with 4 additions and 5 deletions

View File

@ -2245,9 +2245,9 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
conn.setConf("DisableNetwork","0");
}
catch (IOException ioe)
catch (Exception ioe)
{
ioe.printStackTrace();
Log.e(TAG, "Connection exception occured resetting exits",ioe);
}
}
}
@ -2270,12 +2270,11 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
conn.setConf("DisableNetwork","1");
conn.setConf("DisableNetwork","0");
}
catch (IOException ioe)
catch (Exception ioe)
{
ioe.printStackTrace();
Log.e(TAG, "Connection exception occured resetting exits",ioe);
}
}
}