]> git.etc.gen.nz Git - spong.git/commitdiff
added timeout parameter of 10 to check_tcp() calls
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:35:36 +0000 (20:35 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:35:36 +0000 (20:35 +0000)
src/lib/Spong/Network/plugins/check_http

index 02342c688159dc987c8db04a424ecc2410cd003c..1738263cf133834f8931ecc8a2f5c9a2e2a54cd6 100755 (executable)
@@ -39,7 +39,7 @@ sub check_http {
          
          my $message = 
            &check_tcp( $hname, $port,
-               "HEAD $urlpath HTTP/1.1\r\nHost: $hname:$port\r\n\r\n" );
+               "HEAD $urlpath HTTP/1.1\r\nHost: $hname:$port\r\n\r\n", 10 );
 
          if( $message =~ /HTTP\S+\s+(\d\d\d)\s.*$/m ) {
             my $code = $1;
@@ -67,7 +67,7 @@ sub check_http {
 
       foreach $file ( @http_files ) {
          my $message = 
-           &check_tcp( $host, $http_port, "HEAD $file HTTP/1.0\r\n\r\n" );
+           &check_tcp( $host, $http_port, "HEAD $file HTTP/1.0\r\n\r\n", 10 );
       
          if( $message =~ /HTTP\S+\s+(\d\d\d)\s.*$/m ) {
            my $code = $1;