about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-09 00:00:11 +0000
committerEric Wong <e@80x24.org>2016-07-09 00:00:11 +0000
commit7069b0be34287c5aa03a4b50c6177bcc683a92dd (patch)
treecf868816985780044c781f72c5ba1f110249751b /lib/PublicInbox/NNTP.pm
parent7892892a89e4fb9ce618c66e9f3d61f680ba7372 (diff)
downloadpublic-inbox-7069b0be34287c5aa03a4b50c6177bcc683a92dd.tar.gz
Danga::Socket::write will set the closed flag on a socket,
automatically, and we do not need to bring down an entire
server when one client breaks the connection :P
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 0b30d43a..5b055bca 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -894,7 +894,7 @@ sub more ($$) {
 sub do_write ($$) {
         my ($self, $data) = @_;
         my $done = $self->write($data);
-        die if $self->{closed};
+        return if $self->{closed};
 
         # Do not watch for readability if we have data in the queue,
         # instead re-enable watching for readability when we can