Skip to content

Commit

Permalink
Log exception encountered while running tryRunningWithTimeoutAsync.
Browse files Browse the repository at this point in the history
  • Loading branch information
iiordanov committed Feb 21, 2024
1 parent cd7fec1 commit f96def6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bVNC/src/main/java/com/iiordanov/util/NetworkUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object NetworkUtils {
block: (CoroutineScope) -> Boolean?, dispatcher: CoroutineDispatcher
): Boolean {
return runBlocking {
this.tryRunningWithTimeoutAsync(block, false, 1000L, dispatcher)
this.tryRunningWithTimeoutAsync(block, false, 2000L, dispatcher)
} ?: false
}

Expand All @@ -58,8 +58,8 @@ object NetworkUtils {
block()
}
}
} catch (ex: Exception) {
Log.w(tag, "tryRunningWithTimeoutAsync: Exception caught, default $default returned")
} catch (e: Exception) {
Log.w(tag, "tryRunningWithTimeoutAsync: Exception caught, default $default returned. Exception: '$e'")
default
}
}
Expand Down

0 comments on commit f96def6

Please sign in to comment.