thaliproject / Tor_Onion_Proxy_Library

Provides a JAR and an AAR for embedding the Tor Onion Proxy into a Java or Android Program
Apache License 2.0
179 stars 98 forks source link

OnionProxyManager: Don't throw IllegalStateException on boolean methods. #64

Closed sisbell closed 5 years ago

sisbell commented 5 years ago

If there is no control connection, OnionProxyManager throws IllegalStateException on isRunning and isNetworkEnabled . These are Boolean checks so we should just return false if there is no control connection. Propagating this RuntimeException up the stack can cause unexpected crashes.