]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
ds: long_step: eliminate redundant fileno call
authorEric Wong <e@80x24.org>
Sat, 25 Nov 2023 20:54:35 +0000 (20:54 +0000)
committerEric Wong <e@80x24.org>
Sun, 26 Nov 2023 01:05:26 +0000 (01:05 +0000)
We already stash the associated FD for reporting at startup and
don't need to call `fileno' again.  Found via manual code
inspection while considering the effort to make async {forward}
from PublicInbox::HTTP more like the generic long_response API
and {long_cb} field used by IMAP/NNTP/POP3.

lib/PublicInbox/DS.pm

index 4c8b502f484d8a93d74579f833e87f0cc9b0138e..8bc8cfb77ba699ab1490455543d21259fea602a8 100644 (file)
@@ -629,7 +629,6 @@ sub long_step {
                delete $self->{long_cb};
                $self->long_response_done;
                my $elapsed = now() - $t0;
-               my $fd = fileno($self->{sock});
                $self->out(" deferred[$fd] done - %0.6f", $elapsed);
                my $wbuf = $self->{wbuf}; # do NOT autovivify
                requeue($self) unless $wbuf && @$wbuf;