Fix throwing in finally

This commit is contained in:
Mygod
2020-12-10 06:23:43 +08:00
parent 3624cc93c7
commit df6676950d

View File

@@ -226,7 +226,11 @@ class RootServer {
}
future.await()
} finally {
readUnexpectedStderr()?.let { Logger.me.e(it) }
try {
readUnexpectedStderr()?.let { Logger.me.e(it) }
} catch (e: IOException) {
Logger.me.e("Failed to read from stderr", e) // avoid the real exception being swallowed
}
}
/**