From: hadaq Date: Wed, 28 Jan 2009 16:43:50 +0000 (+0000) Subject: ReuseAddr option for socket added. Sergey. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b23c5551a0fbe1aea7b5bc43d2dc30a26a6d7bd4;p=hadesicinga.git ReuseAddr option for socket added. Sergey. --- diff --git a/plugins/check_lustre.pl b/plugins/check_lustre.pl index 4c580f9..3a93f53 100755 --- a/plugins/check_lustre.pl +++ b/plugins/check_lustre.pl @@ -107,11 +107,13 @@ sub statusServer{ my $client_socket; my $selector; + # To decrease a wait time for socket, use + # ReuseAddr with Linux and ReusePort with OpenBSD unless (defined( $server_socket = IO::Socket::INET->new( LocalPort => $server_port, Proto => 'tcp', Listen => SOMAXCONN, - ReusePort => 1) )) + ReuseAddr => 1) )) { print "ERROR: Cannot start status server!\n"; &exitProgram(2);