Skip to content

Commit

Permalink
Remove timeout, the UI should show the user that there is an issue wi…
Browse files Browse the repository at this point in the history
…th Shizuku
  • Loading branch information
d4rken committed Aug 1, 2024
1 parent 887fbda commit 68f1e9c
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import kotlinx.coroutines.withTimeout
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.time.Duration.Companion.seconds

@Singleton
class ShizukuManager @Inject constructor(
Expand Down Expand Up @@ -133,10 +131,8 @@ class ShizukuManager @Inject constructor(

suspend fun isOurServiceAvailable(): Boolean = withContext(dispatcherProvider.IO) {
try {
withTimeout(8.seconds) {
log(TAG, VERBOSE) { "isOurServiceAvailable(): Requesting service client" }
serviceClient.get().use { it.item.ipc.checkBase() != null }
}
log(TAG, VERBOSE) { "isOurServiceAvailable(): Requesting service client" }
serviceClient.get().use { it.item.ipc.checkBase() != null }
} catch (e: Exception) {
log(TAG, WARN) { "isOurServiceAvailable(): Error during checkBase(): $e" }
false
Expand Down

0 comments on commit 68f1e9c

Please sign in to comment.