LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: msergeant@cvs.perl.org Date: Wed Mar 28 15:33:13 2007 Subject: [svn:qpsmtpd] r730 - trunk/lib/Danga
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
+ }
+ });
}
}
| Navigate in group perl.cvs.qpsmtpd at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |