- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for isInterrupted (0.18 sec)
-
docs/changelogs/changelog_1x.md
following a redirect from a POST to a GET. * Implement basic support for `Thread.interrupt()`. OkHttp now checks for an interruption before doing a blocking call. If it is interrupted, it throws an `InterruptedIOException`. ## Version 1.5.2 _2014-03-17_ * Fix bug where deleting a file that was absent from the `HttpResponseCache` caused an IOException.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 6.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
nanos: Long, ) { taskRunner.assertThreadHoldsLock() check(waitingCoordinatorTask == null) if (nanos == 0L) return // Yield until notified, interrupted, or the duration elapses. val waitUntil = nanoTime + nanos val self = currentTask waitingCoordinatorTask = self waitingCoordinatorNotified = false
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 12.6K bytes - Viewed (0) -
docs/changelogs/changelog_3x.md
* Fix: Reverse suppression of connect exceptions. When both a call and its retry fail, we now throw the initial exception which is most likely to be actionable. * Fix: Retain interrupted state when throwing `InterruptedIOException`. A single interrupt should now be sufficient to break out an in-flight OkHttp call. * Fix: Don't drop a call to `EventListener.callEnd()` when the response body is consumed inside an
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 14:55:54 GMT 2022 - 50.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
} condition.await() // Wait until we receive a WINDOW_UPDATE. } } catch (e: InterruptedException) { Thread.currentThread().interrupt() // Retain interrupted status. throw InterruptedIOException() } toWrite = minOf(byteCount, writeBytesMaximum - writeBytesTotal).toInt() toWrite = minOf(toWrite, writer.maxDataLength())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 32.6K 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.
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/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
socket.setReceiveBufferSize(SOCKET_BUFFER_SIZE) return socket } }, ) .build() } @AfterEach fun tearDown() { Thread.interrupted() // Clear interrupted state. } @Test fun interruptWritingRequestBody() { server.enqueue(MockResponse()) server.start() val call = client.newCall( Request.Builder()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
/** * Like [Object.wait], but throws an [InterruptedIOException] when interrupted instead of the more * awkward [InterruptedException]. */ @Throws(InterruptedIOException::class) internal fun waitForIo() { try { condition.await() } catch (_: InterruptedException) { Thread.currentThread().interrupt() // Retain interrupted status. throw InterruptedIOException() } } /**
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) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
}, ), ) cancelLater(call, 500) assertFailsWith<IOException> { call.execute() }.also { expected -> assertEquals(cancelMode == INTERRUPT, Thread.interrupted()) } } @ParameterizedTest @ArgumentsSource(CancelModelParamProvider::class) fun cancelReadingResponseBody(mode: Pair<CancelMode, ConnectionType>) { setUp(mode)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 9.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt
Thread.currentThread().interrupt() try { val result = publicSuffixDatabase.getEffectiveTldPlusOne("squareup.com") assertThat(result).isEqualTo("squareup.com") } finally { assertThat(Thread.interrupted()).isTrue() } } @Test fun secondReadFailsSameAsFirst() { val badPublicSuffixDatabase = PublicSuffixDatabase( path = "/xxx.gz".toPath(), )
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.3K bytes - Viewed (0)