lib/async/http/cache/body.rb in async-http-cache-0.1.0 vs lib/async/http/cache/body.rb in async-http-cache-0.1.1
- old
+ new
@@ -35,10 +35,12 @@
# Set the message body to the rewindable body:
message.body = rewindable
# Wrap the message with the callback:
::Protocol::HTTP::Body::Streamable.wrap(message) do |error|
- unless error
+ if error
+ Async.logger.error(self) {error}
+ else
yield message, rewindable.buffered
end
end
else
yield message, nil