user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/3] nntp: do not re-enable reads during long responses
  2015-09-20  4:43  5% [PATCH 0/3] more nntpd updates Eric Wong
@ 2015-09-20  4:43  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-20  4:43 UTC (permalink / raw)
  To: meta

Long responses may leave the buffer momentarily empty,
but we must prevent read events from firing at that point.
---
 lib/PublicInbox/NNTP.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index d513953..0e91082 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -754,7 +754,9 @@ sub event_err { $_[0]->close }
 sub event_write {
 	my ($self) = @_;
 	# only continue watching for readability when we are done writing:
-	$self->write(undef) == 1 and $self->watch_read(1);
+	if ($self->write(undef) == 1 && !$self->{long_res}) {
+		$self->watch_read(1);
+	}
 }
 
 sub event_read {
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] more nntpd updates
@ 2015-09-20  4:43  5% Eric Wong
  2015-09-20  4:43  7% ` [PATCH 2/3] nntp: do not re-enable reads during long responses Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-20  4:43 UTC (permalink / raw)
  To: meta

We're closer to being production-ready, now.  We'll support all the
signal handling to do graceful shutdowns, transparent upgrades, etc.
with or without systemd.

There is adjustable multi-process support to take better advantage
of multiple cores and disks.

Eric Wong (3):
      nntpd: support systemd FD inheritance + signals
      nntp: do not re-enable reads during long responses
      nntp: fix handling of trickled responses

 lib/PublicInbox/NNTP.pm      |  41 +++++-
 lib/PublicInbox/NewsGroup.pm |   5 +-
 public-inbox-nntpd           | 302 ++++++++++++++++++++++++++++++++++++++++---
 t/nntpd.t                    | 106 +++++++++++++++
 4 files changed, 425 insertions(+), 29 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-20  4:43  5% [PATCH 0/3] more nntpd updates Eric Wong
2015-09-20  4:43  7% ` [PATCH 2/3] nntp: do not re-enable reads during long responses Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).