Refine code style

This commit is contained in:
Mygod
2021-05-27 13:33:26 -04:00
parent b6bdf8cfb7
commit 87a1b8b08d
17 changed files with 65 additions and 52 deletions

View File

@@ -218,9 +218,9 @@ class RootServer {
throw e
} finally {
Logger.me.d("Waiting for exit")
errorReader.await()
withContext(NonCancellable) { errorReader.await() }
process.waitFor()
withContext(NonCancellable) { closeInternal(true) }
closeInternal(true)
}
}
}
@@ -290,7 +290,7 @@ class RootServer {
}
}
private suspend fun closeInternal(fromWorker: Boolean = false) = synchronized(callbackLookup) {
private fun closeInternal(fromWorker: Boolean = false) = synchronized(callbackLookup) {
if (active) {
active = false
Logger.me.d(if (fromWorker) "Shutting down from worker" else "Shutting down from client")