From 338d815c0636c3bcd3fbbf5e4570a6d11c086c51 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Mon, 20 Mar 2000 02:52:52 +0000 Subject: [PATCH] moved alarm(0) calling to in eval statement where it belongs --- src/spong-server.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spong-server.pl b/src/spong-server.pl index 9f0816a..ee34cd5 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -226,6 +226,7 @@ sub listen_for_updates { while( 1 ) { next unless ( $client = $sock->accept() ); my $paddr = $client->peerhost(); + &debug("Connection from $paddr",6); # &validate_connection( $paddr ); - need to do something here... @@ -241,14 +242,15 @@ sub listen_for_updates { alarm($SPONG_SERVER_ALARM) if $SPONG_SERVER_ALARM; $header = <$client>; chomp $header; + &debug("msg header = $header",6); while( defined( $line = <$client> ) ) { last if ($cnt += length($line)) > 100000; $message .= $line; } + alarm(0); $ok = 1; }; - alarm(0); undef $client; if ( ! $ok ) { -- 2.30.2