Permalink
Browse files

Mark servers down after connect()-related errors.

  • Loading branch information...
1 parent 6c880c4 commit a0c24755e97d1f1717bad454c1ff4ccea973be77 Brandon Mitchell committed Sep 10, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/thrift_client/abstract_thrift_client.rb
@@ -107,6 +107,9 @@ def connect!
transport.timeout = @options[:timeout] if transport_can_timeout?
@client = @client_class.new(@options[:protocol].new(transport, *@options[:protocol_extra_params]))
do_callbacks(:post_connect, self)
+ rescue IOError, Thrift::TransportException
+ disconnect_on_error!
+ retry
end
def disconnect!

0 comments on commit a0c2475

Please sign in to comment.