diff options
author | Eric Wong <e@80x24.org> | 2019-06-24 02:52:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-24 05:26:26 +0000 |
commit | 62e3722f13164696a7af66cfa6253f69f0f5892b (patch) | |
tree | 583601e2243609a85d89179b7f8e4e9f3ccc993c /lib/PublicInbox/NNTP.pm | |
parent | 7c89df780b7b160fe85b8a355455d06ec8499205 (diff) | |
download | public-inbox-62e3722f13164696a7af66cfa6253f69f0f5892b.tar.gz |
This is cleaner in most cases and may allow Perl to reuse memory from unused fields. We can do this now that we no longer support Perl 5.8; since Danga::Socket was written with struct-like pseudo-hash support in mind, and Perl 5.9+ dropped support for pseudo-hashes over a decade ago.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index fbdf1364..6a582ea4 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -624,7 +624,7 @@ sub long_response ($$) { $self->{long_res} = sub { my $more = eval { $cb->() }; if ($@ || !$self->{sock}) { # something bad happened... - $self->{long_res} = undef; + delete $self->{long_res}; if ($@) { err($self, @@ -646,7 +646,7 @@ sub long_response ($$) { push @$nextq, $self; $nextt ||= PublicInbox::EvCleanup::asap(*next_tick); } else { # all done! - $self->{long_res} = undef; + delete $self->{long_res}; check_read($self); res($self, '.'); out($self, " deferred[$fd] done - %0.6f", now() - $t0); |