Disconnect as soon as binder died

This commit is contained in:
Mygod
2018-02-03 22:24:42 -08:00
parent be79e6f80c
commit 3975f3f43c
2 changed files with 6 additions and 2 deletions
@@ -196,8 +196,8 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
override fun onServiceConnected(service: IShadowsocksService) = changeState(service.state)
override fun onServiceDisconnected() = changeState(BaseService.IDLE)
override fun binderDied() {
super.binderDied()
app.handler.post {
connection.disconnect()
Executable.killAll()
connection.connect()
}