Skip to content

Commit 3d59851

Browse files
committed
added timeout
1 parent fb13b4b commit 3d59851

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/adyen/client.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ def initialize(ws_user: nil, ws_password: nil, api_key: nil, oauth_token: nil, e
3434
@live_url_prefix = live_url_prefix
3535
@connection_options = connection_options || Faraday::ConnectionOptions.new(
3636
request: {
37-
open_timeout: 5, # seconds to establish connection
38-
timeout: 10, # seconds to wait for response
39-
read_timeout: 30, # seconds to wait for data once the request is sent
40-
write_timeout: 30 # seconds to wait for the request body to be written
37+
open_timeout: 30,
38+
timeout: 60,
39+
read_timeout: 60,
40+
write_timeout: 60
4141
}
4242
)
43-
@terminal_region = terminal_region
43+
44+
# store them for later override
45+
@open_timeout = @connection_options.dig(:request, :open_timeout)
46+
@timeout = @connection_options.dig(:request, :timeout)
4447
end
4548

4649
# make sure that env can only be :live, :test, or :mock

0 commit comments

Comments
 (0)