Permalink
Browse files

Refs #10212 Changed the error count after SystemCallError is raised

  • Loading branch information...
1 parent 8b19634 commit bba6e9c15e8fdefe2f86af07cc66f751fcc7d676 @imaxxs imaxxs committed Sep 21, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/right_http_connection.rb
@@ -434,9 +434,9 @@ def request(request_params, &block)
error_add(e.message)
@logger.warn("#{err_header} request failure count: #{error_count}, exception: #{e.inspect}")
- if(error_count > 5)
- @logger.warn("#{err_header} raising #{exception} due to system call error #{@server} #{error_count} times, error age: #{Time.now.to_i - eof_time.to_i}")
- raise exception.new("SystemCallError is received from #{@server}.")
+ if(error_count > current_params[:http_connection_retry_count]*3)
+ @logger.warn("#{err_header} raising #{exception} due to system call error received by #{@server} #{error_count} times")
+ raise exception.new("SystemCallError : #{Errno::ECONNRESET::Errno} received from #{@server} #{error_count} times")
else
# Sleep same as eof error before new retry
sleep(add_eof)

0 comments on commit bba6e9c

Please sign in to comment.