Appropriately execute IO tasks for JConsoleInput

This commit is contained in:
Him188 2022-01-06 20:51:14 +00:00
parent b58bcfe4ac
commit b62b6c3958

View File

@ -181,7 +181,7 @@ public interface MiraiConsoleImplementation : CoroutineScope {
public fun requestInputJ(hint: String): String
override suspend fun requestInput(hint: String): String {
return withContext(Dispatchers.IO) { requestInputJ(hint) }
return runInterruptible(Dispatchers.IO) { requestInputJ(hint) }
}
}