From f62b3fa5fe94cbd545a36cb95ec6a07133d8d0d3 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Wed, 27 Mar 2024 09:49:21 +0100 Subject: [PATCH] Add TCP open timeout to passwordstate client --- app/models/passwordstate_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/passwordstate_server.rb b/app/models/passwordstate_server.rb index 6da2c71..1f45458 100644 --- a/app/models/passwordstate_server.rb +++ b/app/models/passwordstate_server.rb @@ -109,7 +109,7 @@ class PasswordstateServer < ApplicationRecord def client require 'passwordstate' - @client ||= Passwordstate::Client.new(url, api_type: api_type.to_sym, timeout: 10).tap do |cl| + @client ||= Passwordstate::Client.new(url, api_type: api_type.to_sym, open_timeout: 5, timeout: 10).tap do |cl| if api_type.to_sym == :api cl.auth_data = { apikey: password } else -- GitLab