From 79aee0ee240ac172ce530d9e9a660df694974e64 Mon Sep 17 00:00:00 2001 From: Mark Oleson Date: Wed, 15 Apr 2015 15:14:26 -0400 Subject: [PATCH] If the DNS resolution fails for your redis server, ruby will throw a SocketError, which is currently uncaught by the ab_test helper --- lib/split/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/split/helper.rb b/lib/split/helper.rb index db5cf049..7941f2a6 100644 --- a/lib/split/helper.rb +++ b/lib/split/helper.rb @@ -16,7 +16,7 @@ def ab_test(metric_descriptor, control = nil, *alternatives) else control_variable(experiment.control) end - rescue Errno::ECONNREFUSED, Redis::CannotConnectError => e + rescue Errno::ECONNREFUSED, Redis::CannotConnectError, SocketError => e raise(e) unless Split.configuration.db_failover Split.configuration.db_failover_on_db_error.call(e)