From: Eric Wong Date: Sat, 9 Jul 2016 00:00:11 +0000 (+0000) Subject: nntp: return if a client drops on us X-Git-Tag: v1.0.0~289 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=7069b0be34287c5aa03a4b50c6177bcc683a92dd;p=public-inbox.git nntp: return if a client drops on us 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 --- 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