# (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999)
# Added user-configurable escalation mechanism
#
-# $Id: spong-network.pl,v 1.40 2001/06/20 21:18:54 sljohnson Exp $
+# $Id: spong-network.pl,v 1.41 2002/04/18 15:39:00 sljohnson Exp $
use Carp;
use lib "@@LIBDIR@@";
while (length($msg) < $maxlen) {
recv( SOCK, $line, 256, 0 );
$msg .= $line;
- if (length($line) == 0) { return; } # If the socket is closed, return
+ # If the socket is closed, exit the loop
+ if (length($line) == 0) { last; }
}
alarm(0);
close( SOCK ) || die "close: $!";