]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
ds: do_read: return 0 on EOF
authorEric Wong <e@80x24.org>
Wed, 4 Jun 2025 11:34:57 +0000 (11:34 +0000)
committerEric Wong <e@80x24.org>
Thu, 5 Jun 2025 09:20:59 +0000 (09:20 +0000)
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

index c1d76780686b2b371120376d56e0f98644cca6c5..472f845c7df92f6f3d6194ea1aeb6f9f6c2cfb1f 100644 (file)
@@ -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