Fix NullPointerException caused by delay

This commit is contained in:
Mygod
2017-01-07 15:14:41 +08:00
parent 6d536a901b
commit 5a6e45a2a7
@@ -75,7 +75,7 @@ trait BaseService extends Service {
if (isConnected && profile.kcp && kcptunProcess != null) {
restartHanlder.removeCallbacks(null)
restartHanlder.postDelayed(() => kcptunProcess.restart(), 2000)
restartHanlder.postDelayed(() => if (kcptunProcess != null) kcptunProcess.restart(), 2000)
}
}
var networkReceiverRegistered: Boolean = _