From f6f2753ca56a5d5a71cd1bf5085da083a59dc18b Mon Sep 17 00:00:00 2001 From: Jan Soukal <soukal@ics.muni.cz> Date: Mon, 11 Mar 2013 16:07:35 +0100 Subject: [PATCH] pridan konfigurovatelny parametr CONNECTION_TIMEOUT (#925) --- src/warden-client/lib/WardenClientCommon.pm | 2 +- src/warden-client/lib/WardenClientConf.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/warden-client/lib/WardenClientCommon.pm b/src/warden-client/lib/WardenClientCommon.pm index 26688a0..ca6471d 100755 --- a/src/warden-client/lib/WardenClientCommon.pm +++ b/src/warden-client/lib/WardenClientCommon.pm @@ -69,7 +69,7 @@ sub c2s $client = SOAP::Transport::HTTP::Client->new(); } or return errMsg('Unknown error in c2s() when creating socket, SOAP::Transport::HTTP::Client->new(), ' . $@); - eval {$client->timeout(10);} + eval {$client->timeout($WardenClientConf::CONNECTION_TIMEOUT);} or return errMsg('Unknown error in c2s() when setting socket timeout, ' . $@); eval { diff --git a/src/warden-client/lib/WardenClientConf.pm b/src/warden-client/lib/WardenClientConf.pm index 6d865bd..a83d40f 100755 --- a/src/warden-client/lib/WardenClientConf.pm +++ b/src/warden-client/lib/WardenClientConf.pm @@ -20,6 +20,7 @@ our $LOG_STDERR = 1; our $LOG_SYSLOG = 0; our $LOG_SYSLOG_FACILITY = "local7"; our $LOG_VERBOSE = 0; +our $CONNECTION_TIMEOUT = 60; our $VERSION = "2.2"; -- GitLab