From c658e7d22ad7b4523a8eb79f0c85ac44fe799e8b Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Wed, 9 May 2018 16:51:12 -0700 Subject: [PATCH] add comments for mechanize patch --- config/initializers/mechanize_patch.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/initializers/mechanize_patch.rb b/config/initializers/mechanize_patch.rb index db53be787..027db5fc4 100644 --- a/config/initializers/mechanize_patch.rb +++ b/config/initializers/mechanize_patch.rb @@ -1,6 +1,11 @@ require 'mechanize' if Rails.env.test? + # something about the root certs on the travis ci image causes Mechanize + # to intermittently fail. this is a monkey patch to reset the connection + # after every request to avoid dealing wtiht he issue. + # + # from http://scottwb.com/blog/2013/11/09/defeating-the-infamous-mechanize-too-many-connection-resets-bug/ class Mechanize::HTTP::Agent MAX_RESET_RETRIES = 10