Fix NullPointerException caused by delay
This commit is contained in:
@@ -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 = _
|
||||
|
||||
Reference in New Issue
Block a user