Commit ada47aba authored by Mygod's avatar Mygod

Suppress logging bind exception

parent c2c379da
...@@ -42,6 +42,7 @@ import com.github.shadowsocks.utils.printLog ...@@ -42,6 +42,7 @@ import com.github.shadowsocks.utils.printLog
import com.google.firebase.analytics.FirebaseAnalytics import com.google.firebase.analytics.FirebaseAnalytics
import kotlinx.coroutines.* import kotlinx.coroutines.*
import java.io.File import java.io.File
import java.net.BindException
import java.net.InetAddress import java.net.InetAddress
import java.net.URL import java.net.URL
import java.net.UnknownHostException import java.net.UnknownHostException
...@@ -343,7 +344,9 @@ object BaseService { ...@@ -343,7 +344,9 @@ object BaseService {
} catch (_: UnknownHostException) { } catch (_: UnknownHostException) {
stopRunner(false, getString(R.string.invalid_server)) stopRunner(false, getString(R.string.invalid_server))
} catch (exc: Throwable) { } catch (exc: Throwable) {
if (exc !is PluginManager.PluginNotFoundException && exc !is VpnService.NullConnectionException) { if (exc !is PluginManager.PluginNotFoundException &&
exc !is BindException &&
exc !is VpnService.NullConnectionException) {
printLog(exc) printLog(exc)
} }
stopRunner(false, "${getString(R.string.service_failed)}: ${exc.localizedMessage}") stopRunner(false, "${getString(R.string.service_failed)}: ${exc.localizedMessage}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment