We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39ee771 commit 35b12b3Copy full SHA for 35b12b3
lib/async/http/faraday/adapter.rb
@@ -41,10 +41,6 @@ class Adapter < ::Faraday::Adapter
41
IOError,
42
SocketError
43
].freeze
44
- TIMEOUT_EXCEPTIONS = [
45
- Errno::ETIMEDOUT,
46
- Async::TimeoutError
47
- ].freeze
48
49
def initialize(*arguments, **options, &block)
50
super
@@ -68,7 +64,7 @@ def call(env)
68
64
end
69
65
70
66
return @app.call(env)
71
- rescue *TIMEOUT_EXCEPTIONS => e
67
+ rescue Errno::ETIMEDOUT => e
72
raise ::Faraday::TimeoutError, e
73
rescue OpenSSL::SSL::SSLError => e
74
raise ::Faraday::SSLError, e
@@ -83,7 +79,7 @@ def call(env)
83
79
84
80
def with_timeout
85
81
if @timeout
86
- Async::Task.current.with_timeout(@timeout) do
82
+ Async::Task.current.with_timeout(@timeout, ::Faraday::TimeoutError) do
87
yield
88
89
else
0 commit comments