]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTP.pm
ds: move EvCleanup code into DS
[public-inbox.git] / lib / PublicInbox / NNTP.pm
index 41f1e9c1ed9e6a5321b1ead30853419b43fad644..c9487114516cd5b254dfc87285d9354183a51250 100644 (file)
@@ -11,7 +11,6 @@ use PublicInbox::Search;
 use PublicInbox::Msgmap;
 use PublicInbox::MID qw(mid_escape);
 use PublicInbox::Git;
-require PublicInbox::EvCleanup;
 use Email::Simple;
 use POSIX qw(strftime);
 use PublicInbox::DS qw(now);
@@ -70,7 +69,7 @@ sub expire_old () {
                }
        }
        $EXPMAP = \%new;
-       $expt = scalar(keys %new) ? PublicInbox::EvCleanup::later(*expire_old)
+       $expt = scalar(keys %new) ? PublicInbox::DS::later(*expire_old)
                                  : undef;
 }
 
@@ -94,7 +93,7 @@ sub new ($$$) {
                greet($self);
        }
        update_idle_time($self);
-       $expt ||= PublicInbox::EvCleanup::later(*expire_old);
+       $expt ||= PublicInbox::DS::later(*expire_old);
        $self;
 }
 
@@ -995,7 +994,7 @@ sub event_step {
                my $off = bytes::length($$rbuf);
                $r = $self->do_read($rbuf, LINE_MAX, $off) or return;
        }
-       while ($r > 0 && $$rbuf =~ s/\A[ \t\r\n]*([^\r\n]*)\r?\n//) {
+       while ($r > 0 && $$rbuf =~ s/\A[ \t]*([^\n]*?)\r?\n//) {
                my $line = $1;
                return $self->close if $line =~ /[[:cntrl:]]/s;
                my $t0 = now();