Skip to content
Permalink
Branch: master
Commits on Oct 19, 2019
  1. Merge pull request #5560 from amirlivneh/eventlistener-doc

    swankjesse committed Oct 19, 2019
    Fix EventListener documentation
Commits on Oct 7, 2019
  1. Merge pull request #5540 from square/jwilson.1006.cancel_everything

    swankjesse committed Oct 7, 2019
    Make all TaskRunner tasks cancelable
  2. Merge pull request #5539 from square/jwilson.1006.422_chnanges

    swankjesse committed Oct 7, 2019
    Change log for OkHttp 4.2.2.
  3. Make all TaskRunner tasks cancelable

    swankjesse committed Oct 6, 2019
    This probably should have been the case all along. Unfortunately,
    ExecutorService Runnables are not cancelable by default, and that's
    where we started.
    
    After implementing all of TaskRunner it looks like where we're
    cancelable and where we aren't is totally arbitrary. Making everything
    cancelable simplifies the implementation and model.
    
    The last remaining non-cancelable tasks:
     * awaitIdle() which we use in our tests only.
     * MockWebServer, where canceling would leak sockets
  4. Merge pull request #5538 from square/jwilson.1006.taskwriter_mws

    swankjesse committed Oct 7, 2019
    Use TaskRunner in MockWebServer
Commits on Oct 6, 2019
  1. Change log for OkHttp 4.2.2.

    swankjesse committed Oct 6, 2019
  2. Use TaskRunner in MockWebServer

    swankjesse committed Oct 6, 2019
    The utility here is negligible. We're sharing threads between HTTP,
    HTTP/2 and web sockets now.
  3. Merge pull request #5535 from square/jwilson.1006.task_names

    swankjesse committed Oct 6, 2019
    Be more consistent with task names
  4. Merge pull request #5536 from square/jwilson.1006.brotli_docs

    swankjesse committed Oct 6, 2019
    Include Brotli docs in the OkHttp website
  5. Include Brotli docs in the OkHttp website

    swankjesse committed Oct 6, 2019
  6. Be more consistent with task names

    swankjesse committed Oct 6, 2019
    Examples:
      - OkHttp TaskRunner
      - MockWebServer TaskRunner
      - OkHttp ConnectionPool
      - MockWebServer localhost applyAndAckSettings
      - OkHttp android.com applyAndAckSettings
      - OkHttp android.com onSettings
      - OkHttp awaitIdle
      - OkHttp localhost
    
    I'm trying to use type names where appropriate, or method names otherwise.
    Names include hostname and stream name if the task is working on behalf
    of a specific stream or connection.
  7. Merge pull request #5532 from square/jwilson.1004.new_task_runner

    swankjesse committed Oct 6, 2019
    Change TaskRunner to limit context switches.
  8. Change TaskRunner to limit context switches.

    swankjesse committed Oct 5, 2019
    Now we don't have to alternate between the coordinator thread and the task
    thread between task runs if the task returns 0. Instead the task thread can
    stay resident.
    
    This implementation works by having task runnables that can switch from
    the coordinator role (sleeping until the next task starts) and the executor
    role.
    
    #5512
  9. Merge pull request #5528 from square/jwilson.1003.dont_eof_canceled_s…

    swankjesse committed Oct 6, 2019
    …treams
    
    Add a way for MockWebServer to track truncated requests
  10. Add a way for MockWebServer to track truncated requests

    swankjesse committed Oct 4, 2019
    It now tracks inbound requests that fail with an IOException.
    
    Also add a fix for the bug where we'd send 'END OF STREAM' on a stream
    that we'd previously canceled, which raced with the 'RST STREAM' and led
    to flakiness.
    
    Before we ship the new API in RecordedRequest we should go over the
    other cases where inbound HTTP requests fail and make sure they
    get reported through this channel.
    
    Closes: #5388
Commits on Oct 3, 2019
  1. Name tasks only in TaskRunner (#5526)

    swankjesse and yschimke committed Oct 3, 2019
    * Name tasks only in TaskRunner
    
    Naming queues seemed good initially, but the names are mostly
    mutually-redundant with task names.
    
    This PR reduces debug information when a queue is still busy
    when the test completes. I have a fix for that in a follow-up
    change.
    
    * Update okhttp/src/main/java/okhttp3/internal/ws/RealWebSocket.kt
    
    Co-Authored-By: Yuri Schimke <yuri@schimke.ee>
Commits on Oct 2, 2019
  1. Update changelog for 4.2.1.

    swankjesse committed Oct 2, 2019
  2. Merge pull request #5520 from square/jwilson.1001.fix_pooling

    swankjesse committed Oct 2, 2019
    Fix connection pooling for different clients with the same pool.
  3. Merge pull request #5517 from square/jwilson.1001.cancel

    swankjesse committed Oct 2, 2019
    Make TaskRunner cancellation less dynamic
  4. Fix connection pooling for different clients with the same pool.

    swankjesse committed Oct 2, 2019
    Closes: #5519
  5. Make TaskRunner cancellation less dynamic

    swankjesse committed Oct 2, 2019
    We don't need to be called back when a call is being canceled.
    This was unnecessary complexity that I thought I'd need for OkHttp
    but I don't.
  6. Merge pull request #5518 from yschimke/default_jdk9

    swankjesse committed Oct 2, 2019
    Default to jdk9 platform for tests
Commits on Oct 1, 2019
  1. Merge pull request #5513 from square/jwilson.0929.http2_listeners

    swankjesse committed Oct 1, 2019
    Change HTTP/2 connections to track settings snapshots
  2. Change HTTP/2 connections to track settings snapshots

    swankjesse committed Sep 29, 2019
    Previously we mutated one instance as directed by the peer. This
    was difficult to reason about.
    
    This change includes migration of settings listeners to TaskRunner.
    TaskRunner makes it easier to notify the listener of settings
    changes serially, which makes these snapshots more useful.
Commits on Sep 29, 2019
  1. Update changelog for 3.12.6, 3.14.4

    swankjesse committed Sep 29, 2019
  2. Merge pull request #5510 from square/jwilson.0928.task_runner_websockets

    swankjesse committed Sep 29, 2019
    Use TaskRunner in web sockets.
  3. Use TaskRunner in web sockets.

    swankjesse committed Sep 29, 2019
    The most consequential change here is that the background thread is
    now a daemon thread. A program consisting of exactly one web socket
    will exit when the reader reads an inbound close message. Previously
    such a program would continue running until the writer acknowledged
    this close.
  4. Merge pull request #5507 from square/jwilson.0926.okhttpclient_is_lig…

    swankjesse committed Sep 29, 2019
    …htweight
    
    Create OkHttpClient instances eagerly in tests
  5. Create OkHttpClient instances eagerly in tests

    swankjesse committed Sep 27, 2019
    We used to do this lazily because OkHttpClient instances were
    somewhat heavy: each standalone instance held its own
    ExecutorService for the connection pool.
    
    Now that we have TaskRunner each instance is much more
    lightweight and the drawbacks of creating instances eagerly
    is negligible.
  6. Merge pull request #5508 from square/jwilson.0927.titles_in_dokka_pages

    swankjesse committed Sep 29, 2019
    Rewrite Dokka-generated markdown to include titles.
  7. Rewrite Dokka-generated markdown to include titles.

    swankjesse committed Sep 28, 2019
    I tried rendering in jekyll mode but that doesn't look as nice with
    Mkdocs.
  8. Merge pull request #5509 from square/jwilson.0928.kotlin_recipes

    swankjesse committed Sep 29, 2019
    Add Kotlin listings for OkHttp recipes doc
Commits on Sep 28, 2019
  1. Add Kotlin listings for OkHttp recipes doc

    swankjesse committed Sep 28, 2019
Commits on Sep 27, 2019
  1. Merge pull request #5502 from square/jwilson.0926.http2

    swankjesse committed Sep 27, 2019
    TaskRunner support for shutting down queues
  2. TaskRunner support for shutting down queues

    swankjesse committed Sep 26, 2019
    Shutting down queues makes it easier to implement HTTP/2
    shutdown because we can enqueue everywhere and centralize
    the logic that decides whether we're shutdown or not.
    
    Use this new functionality to implement HTTP/2 on task queues.
    It's mostly a drop-in replacement, though opting-into cancel
    looks like a mistake when it's what we do most of the time.
    
    When testing this the OkHttpClientTestRule was failing because
    tasks were incomplete. I was puzzled by this until I realized
    that the OkHttpClientTestRule performs that validation before
    we stop the MockWebServer. I changed MockWebServer to have its
    own TaskRunner and that made the problem go away.
Older
You can’t perform that action at this time.