X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FDS.pm;h=b16b189629ff16d459bc7c79bb0155e43d9642ea;hb=a3c054cbbf2a51be121b3237c5d223acc5c8a2f4;hp=57c420634ca42529f8b7c01a29d459723ad5933c;hpb=d20a122c48a274e224d5c1a8d0f943ae395cff2a;p=public-inbox.git diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 57c42063..b16b1896 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -440,6 +440,7 @@ sub do_read ($$$;$) { if ($! == EAGAIN) { epwait($sock, epbit($sock, EPOLLIN) | EPOLLONESHOT); rbuf_idle($self, $rbuf); + 0; } else { $self->close; } @@ -552,14 +553,15 @@ sub msg_more ($$) { return 0; } } - $self->write(\($_[1])); + + # don't redispatch into NNTPdeflate::write + PublicInbox::DS::write($self, \($_[1])); } sub epwait ($$) { my ($sock, $ev) = @_; epoll_ctl($Epoll, EPOLL_CTL_MOD, fileno($sock), $ev) and confess("EPOLL_CTL_MOD $!"); - 0; } # return true if complete, false if incomplete (or failure) @@ -570,8 +572,10 @@ sub accept_tls_step ($) { return $self->close if $! != EAGAIN; epwait($sock, PublicInbox::TLS::epollbit() | EPOLLONESHOT); unshift @{$self->{wbuf} ||= []}, \&accept_tls_step; + 0; } +# return true if complete, false if incomplete (or failure) sub shutdn_tls_step ($) { my ($self) = @_; my $sock = $self->{sock} or return; @@ -579,6 +583,7 @@ sub shutdn_tls_step ($) { return $self->close if $! != EAGAIN; epwait($sock, PublicInbox::TLS::epollbit() | EPOLLONESHOT); unshift @{$self->{wbuf} ||= []}, \&shutdn_tls_step; + 0; } # don't bother with shutdown($sock, 2), we don't fork+exec w/o CLOEXEC