mirror of
https://github.com/lostisland/faraday.git
synced 2025-11-05 00:03:11 -05:00
Do not suggest system_timer for JRuby.
This commit is contained in:
parent
bb69f7b927
commit
e8ca21f21f
@ -37,7 +37,7 @@ module Faraday
|
|||||||
require RUBY_VERSION < '1.9' ? 'system_timer' : 'timeout'
|
require RUBY_VERSION < '1.9' ? 'system_timer' : 'timeout'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
warn "Faraday: you may want to install system_timer for reliable timeouts"
|
warn "Faraday: you may want to install system_timer for reliable timeouts" unless defined?(JRUBY_VERSION)
|
||||||
ensure
|
ensure
|
||||||
Timer = defined?(::SystemTimer) ? ::SystemTimer : ::Timeout
|
Timer = defined?(::SystemTimer) ? ::SystemTimer : ::Timeout
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user