make the alarm{timeout} thing slightly more efficient...
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@41 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
75e0f9e568
commit
245bdd1acf
@ -305,6 +305,8 @@ sub data {
|
||||
|
||||
my $header = Mail::Header->new(Modify => 0, MailFrom => "COERCE");
|
||||
|
||||
my $timeout = $self->config('timeout');
|
||||
|
||||
while (<STDIN>) {
|
||||
$complete++, last if $_ eq ".\r\n";
|
||||
$i++;
|
||||
@ -341,7 +343,7 @@ sub data {
|
||||
}
|
||||
$self->log(5, "size is at $size\n") unless ($i % 300);
|
||||
|
||||
alarm $self->config('timeout');
|
||||
alarm $timeout;
|
||||
}
|
||||
|
||||
$self->log(6, "max_size: $max_size / size: $size");
|
||||
|
Loading…
Reference in New Issue
Block a user