Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/right_http_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}")
Expand Down