[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] handle NPE better for dev.gp.info #6686



commit e9d28a4445f3dc055f05649792965b249102933c
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Mon Feb 22 15:07:40 2016 -0500

    handle NPE better for dev.gp.info #6686
    in some cases the connection becomes null while you are interacting with it
---
 src/org/torproject/android/service/TorService.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 94e3317..12da009 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -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);    	    	
     	    	}
         	}
     	}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits