Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[svn:qpsmtpd] r730 - trunk/lib/Danga

0 views
Skip to first unread message

mser...@cvs.perl.org

unread,
Mar 28, 2007, 5:33:13 PM3/28/07
to svn-commi...@perl.org
Author: msergeant
Date: Wed Mar 28 14:33:10 2007
New Revision: 730

Modified:
trunk/lib/Danga/Client.pm

Log:
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 :-))


Modified: trunk/lib/Danga/Client.pm
==============================================================================
--- trunk/lib/Danga/Client.pm (original)
+++ trunk/lib/Danga/Client.pm Wed Mar 28 14:33:10 2007
@@ -152,7 +152,11 @@
$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
+ }
+ });
}
}

0 new messages