Skip to content

Commit 3120f1c

Browse files
danhalsonCopilot
andauthored
1004: Add an explicit timeout to the call
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 91f13ce commit 3120f1c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/controllers/api/google_auth_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def exchange_code
2020

2121
conn = Faraday.new do |f|
2222
f.request :url_encoded
23+
f.options.timeout = 10 # connection open timeout
24+
f.options.open_timeout = 5 # connection initialization timeout
2325
end
2426

2527
response = conn.post(TOKEN_EXCHANGE_URL, request_body)

0 commit comments

Comments
 (0)