Class: Rev::DNSResolver::Timeout
- Inherits:
-
TimerWatcher
- Object
- Watcher
- TimerWatcher
- Rev::DNSResolver::Timeout
- Defined in:
- lib/rev/dns_resolver.rb
Instance Method Summary collapse
-
#initialize(resolver) ⇒ Timeout
constructor
A new instance of Timeout.
- #on_timer ⇒ Object
Methods inherited from TimerWatcher
#attach, #detach, #disable, #enable, #reset
Methods inherited from Watcher
#attach, #attached?, #detach, #disable, #enable, event_callback, #evloop, watcher_delegate
Constructor Details
Instance Method Details
#on_timer ⇒ Object
169 170 171 172 173 174 175 |
# File 'lib/rev/dns_resolver.rb', line 169 def on_timer @attempts += 1 return @resolver.send_request if @attempts <= RETRIES @resolver.on_timeout @resolver.detach end |