Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc client fixes #933

Merged
merged 5 commits into from
Oct 14, 2016
Merged

Misc client fixes #933

merged 5 commits into from
Oct 14, 2016

Commits on Oct 13, 2016

  1. fix(client): Handle connection error

    Previously, the connection would be kept alive if there was a connect
    error. Now it's closed immediately.
    jwilm committed Oct 13, 2016
    Configuration menu
    Copy the full SHA
    ef4c08c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    34c4d72 View commit details
    Browse the repository at this point in the history
  3. fix(http): Handle readable in keep-alive

    It's possible that a connection will be closed and the only way to find
    out is by doing a read. The keep-alive state (State::Init + Next_::Wait)
    now tries to read on readable. In the case of EOF, it returns state
    closed. If bytes are actually available, it's a connection error, and
    the connection is closed. Otherwise, it's just a spurious wakeup.
    jwilm committed Oct 13, 2016
    Configuration menu
    Copy the full SHA
    915af2a View commit details
    Browse the repository at this point in the history
  4. fix(client): Improve keep-alive reuse strategy

    The previous keep-alive strategy was to cycle connections in a
    round-robin style. However, that will always keep more connections
    around than are needed. This new strategy will allow extra connections
    to expire when only a few are needed. This is accomplished by prefering
    to reuse a connection that was just released to the pool over one that
    has been there for a long time.
    jwilm committed Oct 13, 2016
    Configuration menu
    Copy the full SHA
    ff55619 View commit details
    Browse the repository at this point in the history
  5. fix(http): Prevent busy looping

    We encountered some issues where the `Conn::ready()` would busy loop on
    reads. Previously, the `ConnInner::can_read_more()` would not consider
    whether the previous read got a WouldBlock error, and it didn't consider
    whether the transport was blocked. Accounting for this additional state
    fixes the busy loop problem.
    jwilm committed Oct 13, 2016
    Configuration menu
    Copy the full SHA
    20fac49 View commit details
    Browse the repository at this point in the history