cvs: CVSROOT / dolog.pl
| From: | Sascha Schumann | Date: | Wed, 20 Sep 2000 07:13:05 +0000 |
| Subject: | cvs: CVSROOT / dolog.pl | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1811@lists.php.net to get a copy of this message | ||
sas Wed Sep 20 00:13:05 2000 EDT
Modified files:
/CVSROOT dolog.pl
Log:
Add hack to prevent eating CPU time, if the remote TCP socket side
is closed.
Index: CVSROOT/dolog.pl
diff -u CVSROOT/dolog.pl:1.17 CVSROOT/dolog.pl:1.18
--- CVSROOT/dolog.pl:1.17 Mon Oct 4 13:33:36 1999
+++ CVSROOT/dolog.pl Wed Sep 20 00:13:04 2000
@@ -240,6 +240,9 @@
sub get_response_code {
my ($expecting) = @_;
+ my ($max);
+
+ $max = 0;
# if ($flag_debug) {
# print STDERR "SMTP: Waiting for code $expecting\n";
# }
@@ -260,6 +263,13 @@
return;
}
die "Bad response from SMTP -- $line";
+ }
+ if ($line =~ /^$/) {
+ ++$max;
+ if ($max > 5) {
+ print STDERR "SMTP Server Failed. Dieing\n";
+ exit;
+ }
}
}
}