about summary refs log tree commit homepage
path: root/public-inbox-nntpd
diff options
context:
space:
mode:
Diffstat (limited to 'public-inbox-nntpd')
-rw-r--r--public-inbox-nntpd4
1 files changed, 4 insertions, 0 deletions
diff --git a/public-inbox-nntpd b/public-inbox-nntpd
index defb16b1..4c156080 100644
--- a/public-inbox-nntpd
+++ b/public-inbox-nntpd
@@ -195,10 +195,14 @@ sub worker_quit {
         $_->close for @listeners;
         @listeners = ();
 
+        # give slow clients 30s to finish reading/writing whatever
+        Danga::Socket->AddTimer(30, sub { exit });
+
         # drop idle connections and try to quit gracefully
         Danga::Socket->SetPostLoopCallback(sub {
                 my ($dmap, undef) = @_;
                 my $n = 0;
+
                 foreach my $s (values %$dmap) {
                         next unless ref($s) eq 'PublicInbox::NNTP';
                         if ($s->{write_buf_size} || $s->{rbuf}) {