Commit d715f7b4 authored by Mygod's avatar Mygod

Fix another crash

parent 7cc3c482
...@@ -198,6 +198,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe ...@@ -198,6 +198,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
override fun binderDied() { override fun binderDied() {
super.binderDied() super.binderDied()
app.handler.post { app.handler.post {
connection.disconnect()
Executable.killAll() Executable.killAll()
connection.connect() connection.connect()
} }
......
...@@ -50,7 +50,6 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection ...@@ -50,7 +50,6 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection
fun onServiceDisconnected() { } fun onServiceDisconnected() { }
override fun binderDied() { override fun binderDied() {
connection.service = null connection.service = null
connection.disconnect()
} }
} }
......
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