Method: Elasticsearch::Transport::Transport::Connections::Connection#resurrectable?
- Defined in:
- lib/elasticsearch/transport/transport/connections/connection.rb
#resurrectable? ⇒ Boolean
Returns true if the connection is eligible to be resurrected as alive, false otherwise.
135 136 137 138 139 |
# File 'lib/elasticsearch/transport/transport/connections/connection.rb', line 135 def resurrectable? @state_mutex.synchronize { Time.now > @dead_since + ( @options[:resurrect_timeout] * 2 ** (@failures-1) ) } end |