- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 312 for Try (0.2 sec)
-
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
val builder = OkHttpClient.Builder() try { builder.callTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try { builder.connectTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try { builder.writeTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
* operation, it will be re-interrupted after the list is read. */ private fun readTheListUninterruptibly() { var interrupted = false try { while (true) { try { readTheList() return } catch (_: InterruptedIOException) { Thread.interrupted() // Temporarily clear the interrupted state. interrupted = true
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
if (!initialized || closed) { return -1L // Nothing to do. } try { trimToSize() } catch (_: IOException) { mostRecentTrimFailed = true } try { if (journalRebuildRequired()) { rebuildJournal() redundantOpCount = 0 }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 34.7K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
server.enqueue( MockResponse.Builder() .bodyDelay(5, TimeUnit.SECONDS) .body("abc") .build(), ) val call = client.newCall(request) try { withTimeout(1.seconds) { call.executeAsync().use { withContext(Dispatchers.IO) { it.body.string() } fail("No expected to get response")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 18 01:24:38 GMT 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
this.withLock { while (headersQueue.isEmpty() && errorCode == null) { val doReadTimeout = callerIsIdle || doReadTimeout() if (doReadTimeout) { readTimeout.enter() } try { waitForIo() } finally { if (doReadTimeout) { readTimeout.exitAndThrowIfTimedOut() } } } if (headersQueue.isNotEmpty()) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 23.2K bytes - Viewed (1) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
} var started: Boolean = false private var shutdown: Boolean = false @Synchronized private fun before() { if (started) return // Don't call start() in case we're already shut down. try { start() } catch (e: IOException) { throw RuntimeException(e) } } fun toProxyAddress(): Proxy { before()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 37.4K bytes - Viewed (0) -
native-image-tests/src/main/kotlin/okhttp3/RunTests.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt
* detail is invisible to the caller, but subtle use of certain APIs may depend on these internal * structures. * * We make such subtle calls in [okhttp3.internal.ws.MessageInflater] because we try to read a * compressed stream that is terminated in a web socket frame even though the DEFLATE stream is * not terminated. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 4.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
var random: String? = null lateinit var currentThread: Thread private val loggerHandler = object : Handler() { override fun publish(record: LogRecord) { // Try to avoid multi threading issues with concurrent requests if (Thread.currentThread() != currentThread) { return }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.7K bytes - Viewed (1) -
okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt
@JvmStatic fun isAlpnBootEnabled(): Boolean = try { Class.forName("org.eclipse.jetty.alpn.ALPN", true, null) true } catch (cnfe: ClassNotFoundException) { false } val isCorrettoSupported: Boolean = try { // Trigger an early exception over a fatal error, prefer a RuntimeException over Error.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 15.3K bytes - Viewed (0)