* [PATCH] nntp: return if a client drops on us
@ 2016-07-09 0:02 7% Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2016-07-09 0:02 UTC (permalink / raw)
To: meta
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
---
lib/PublicInbox/NNTP.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 0b30d43..5b055bc 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
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-07-09 0:02 7% [PATCH] nntp: return if a client drops on us 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).