Close connection on error after sending started.

When the application starts yielding a body and then raises an error,
we should immediately close the connection to the client to indicate
the error.
add Alexandre Zani to THANKS