From e535ad66052a78704e0096a6d6eeaeb19f5c0fa3 Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Thu, 21 Jun 2012 13:33:10 +0200 Subject: [PATCH] doplnen timetout pro navazani spojeni se serverem --- src/warden-client/lib/WardenClientReceive.pm | 11 ++++++----- src/warden-client/lib/WardenClientSend.pm | 13 +++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/warden-client/lib/WardenClientReceive.pm b/src/warden-client/lib/WardenClientReceive.pm index 4fb27b8..0b7a3f5 100755 --- a/src/warden-client/lib/WardenClientReceive.pm +++ b/src/warden-client/lib/WardenClientReceive.pm @@ -43,12 +43,13 @@ sub c2s if (!($client = SOAP::Transport::HTTP::Client->new())) { errMsg("Sorry, unable to create socket: " . &SOAP::Transport::HTTP::Client::errstr) } + $client->timeout(60); $client->ssl_opts(verify_hostname => 1, - SSL_use_cert => 1, - SSL_verify_mode => 0x02, - SSL_key_file => $ssl_key_file, - SSL_cert_file => $ssl_cert_file, - SSL_ca_file => $ssl_ca_file); + SSL_use_cert => 1, + SSL_verify_mode => 0x02, + SSL_key_file => $ssl_key_file, + SSL_cert_file => $ssl_cert_file, + SSL_ca_file => $ssl_ca_file); # setting of URI and serialize SOAP envelope and data object my $soap = SOAP::Lite->uri($service)->proxy($uri); diff --git a/src/warden-client/lib/WardenClientSend.pm b/src/warden-client/lib/WardenClientSend.pm index 25966b0..05f7850 100755 --- a/src/warden-client/lib/WardenClientSend.pm +++ b/src/warden-client/lib/WardenClientSend.pm @@ -39,17 +39,18 @@ sub c2s my $data = shift; my ($server, $port, $service) = $uri =~ /https:\/\/(.+)\:(\d+)\/(.+)/; - + my $client; if (!($client = SOAP::Transport::HTTP::Client->new())) { errMsg("Sorry, unable to create socket: " . &SOAP::Transport::HTTP::Client::errstr) } + $client->timeout(60); $client->ssl_opts(verify_hostname => 1, - SSL_use_cert => 1, - SSL_verify_mode => 0x02, - SSL_key_file => $ssl_key_file, - SSL_cert_file => $ssl_cert_file, - SSL_ca_file => $ssl_ca_file); + SSL_use_cert => 1, + SSL_verify_mode => 0x02, + SSL_key_file => $ssl_key_file, + SSL_cert_file => $ssl_cert_file, + SSL_ca_file => $ssl_ca_file); # setting of URI and serialize SOAP envelope and data object -- GitLab