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

Stop sending response data if connection is closed #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 23, 2018

  1. Stop sending response data if connection is closed

    If the connection has been closed, there is no point in continuing
    iterating over the response body and continuing to send data, because it
    will never get written to the socket anyway. This saves on performance.
    
    Also, once `#close` has been called on the response body, continuing to
    iterate over it might raise an exception. Imagine a scenario where the
    body is a lazy enumerable that retrieves chunks from an open file, and
    `#close` closes the file.
    janko committed May 23, 2018
    Configuration menu
    Copy the full SHA
    b5c0fcd View commit details
    Browse the repository at this point in the history