about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-02-06 10:33:21 +0000
committerEric Wong <e@80x24.org>2019-02-07 01:00:27 +0000
commite7165be526e984e9b018d157df4515dc817db84f (patch)
tree9d64bdf888a3942ac61e7d931d4d9094cdef6469 /lib/PublicInbox/HTTP.pm
parentc539d9df124a66f07edbae2bc51177a0f756cc95 (diff)
downloadpublic-inbox-e7165be526e984e9b018d157df4515dc817db84f.tar.gz
Don't bother assigning to $_[1]; just let Danga::Socket
do its thing since $_[1] should be out-of-scope soon.
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
-rw-r--r--lib/PublicInbox/HTTP.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index bc10814e..9657b31a 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -318,11 +318,9 @@ sub more ($$) {
                 if (defined $n) {
                         my $nlen = length($_[1]) - $n;
                         return 1 if $nlen == 0; # all done!
-                        eval { $_[1] = substr($_[1], $n, $nlen) };
-                        if ($@) { # modification of read-only value:
-                                return $self->write(substr($_[1], $n, $nlen));
-                        }
-                        # fall through to normal write:
+
+                        # Danga::Socket::write queues the unwritten substring:
+                        return $self->write(substr($_[1], $n, $nlen));
                 }
         }
         $self->write($_[1]);