Skip to content

Rack::BodyProxy should execute block even on failures. #313

Merged
merged 1 commit into from Jan 13, 2012

2 participants

@josevalim
Official Rack repositories member

In general, Rack frameworks are moving logic to close hooks in order
to support async behavior increasing the chance an exception will
happen on close. Most servers will actually die if there is an exception
on close, but such exceptions can also happen in the test environment.
In such cases, we can accidentally leave a mutex locked, a database
connection not collected and so forth, therefore, we need to ensure
the block is called regardless closing the body failed.

@josevalim josevalim Rack::BodyProxy should execute block even on failures.
In general, Rack frameworks are moving logic to close hooks in order
to support async behavior increasing the chance an exception will
happen on close. Most servers will actually die if there is an exception
on close, but such exceptions can also happen in the test environment.
In such cases, we can accidentally leave a mutex locked, a database
connection not collected and so forth, therefore, we need to ensure
the block is called regardless closing the body failed.
b06ef82
@tenderlove tenderlove merged commit 6cb96fe into rack:master Jan 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.