]> git.etc.gen.nz Git - spong.git/commitdiff
moved alarm(0) calling to in eval statement where it belongs
authorStephen L Johnson <sjohnson@monsters.org>
Mon, 20 Mar 2000 02:52:52 +0000 (02:52 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Mon, 20 Mar 2000 02:52:52 +0000 (02:52 +0000)
src/spong-server.pl

index 9f0816a769c2805522cabb0a298a84940761d9b1..ee34cd5f6c6c604584e96d03b370cecdff5c7d1c 100755 (executable)
@@ -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 ) {