Skip to content

Commit

Permalink
rename next_server to next_live_server
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking committed Sep 14, 2010
1 parent f4c1eab commit 650dec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/thrift_client/abstract_thrift_client.rb
Expand Up @@ -75,7 +75,7 @@ def inspect
# called as the connection will be made on the first RPC method
# call.
def connect!
@current_server = next_server
@current_server = next_live_server
@connection = Connection::Factory.create(@options[:transport], @options[:transport_wrapper], @current_server.connection_string, @options[:timeout])
@connection.connect!
@client = @client_class.new(@options[:protocol].new(@connection.transport, *@options[:protocol_extra_params]))
Expand All @@ -99,7 +99,7 @@ def disconnect!

private

def next_server
def next_live_server
if @options[:server_retry_period]
rebuild_live_server_list! if Time.now > @last_rebuild + @options[:server_retry_period]
raise ThriftClient::NoServersAvailable, "No live servers in #{@server_list.inspect} since #{@last_rebuild.inspect}." if @live_server_list.empty?
Expand Down

0 comments on commit 650dec0

Please sign in to comment.