From e1f500705448d6df5cb8a9d8b2433b7e2d048021 Mon Sep 17 00:00:00 2001 From: Rich Meyers Date: Tue, 20 Sep 2011 15:09:40 -0400 Subject: [PATCH] Reraise Interrupt and SystemExit exceptions --- lib/right_http_connection.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/right_http_connection.rb b/lib/right_http_connection.rb index b94c2a5..f167f37 100644 --- a/lib/right_http_connection.rb +++ b/lib/right_http_connection.rb @@ -262,6 +262,8 @@ def setup_streaming(request) def get_fileptr_offset(request_params) request_params[:request].body.pos + rescue Interrupt, SystemExit + raise rescue Exception => e # Probably caught this because the body doesn't support the pos() method, like if it is a socket. # Just return 0 and get on with life. @@ -272,6 +274,8 @@ def reset_fileptr_offset(request, offset = 0) if(request.body_stream && request.body_stream.respond_to?(:pos)) begin request.body_stream.pos = offset + rescue Interrupt, SystemExit + raise rescue Exception => e @logger.warn("Failed file pointer reset; aborting HTTP retries." + " -- #{err_header} #{e.inspect}")