Remove duplicated sanity check

This commit is contained in:
Mygod
2018-09-13 19:10:33 +08:00
parent ce286ccd01
commit c772d82145

View File

@@ -13,7 +13,6 @@ import kotlin.concurrent.withLock
class RootSession : AutoCloseable {
companion object {
private const val TAG = "RootSession"
private const val INIT_CHECKPOINT = "$TAG initialized successfully"
private val monitor = ReentrantLock()
private fun onUnlock() {
@@ -68,12 +67,6 @@ class RootSession : AutoCloseable {
private val stdout = ArrayList<String>()
private val stderr = ArrayList<String>()
init {
// check basic shell functionality very basically
val result = execQuiet("echo $INIT_CHECKPOINT")
checkOutput("echo", result, result.out.joinToString("\n").trim() != INIT_CHECKPOINT)
}
private val isAlive get() = shell.isAlive
override fun close() {
shell.close()