From bdd84d4cff34bd1c2bcbae77558c922e5ea0014c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 4 Jun 2025 11:34:57 +0000 Subject: [PATCH] ds: do_read: return 0 on EOF It's conceivable that future users of this internal function will want to distinguish between a client which failed due to some network or HW error or a normal disconnect. --- lib/PublicInbox/DS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index c1d767806..472f845c7 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -457,7 +457,7 @@ sub do_read ($$$;$) { } else { $self->close; } - undef; + $r; # undef or 0 (EOF) } # drop the socket if we hit unrecoverable errors on our system which -- 2.39.5