This fixes a really nasty bug that means that some (mostly spam, admittedly) mail would get missed.

What happens is if you pause the connection (needed if you YIELD for something)
then the line-reading loop exits, and never gets back there unless the client
sends more data. If the client is an abuser (i.e. pipelines) then you might
never get back to the read loop.
(yes, this was a bitch to track down :-))


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@730 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2007-03-28 21:33:10 +00:00
parent ce879879b5
commit eb8a190e44

View File

@ -152,7 +152,11 @@ sub continue_read {
$self->{pause_count}--;
if ($self->{pause_count} <= 0) {
$self->{pause_count} = 0;
# $self->watch_read(1);
$self->AddTimer(0, sub {
if (length($self->{line}) && !$self->paused) {
$self->process_read_buf(\""); # " for bad syntax highlighters
}
});
}
}