about summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-09-17 08:31:23 +0000
committerEric Wong <e@80x24.org>2019-09-17 08:31:49 +0000
commitd2bbf647026a889700d9a62f79ef0875ca41b39a (patch)
treec5220d59370ffbe08cfae109f4ec15accdb53d88
parent1b5b98eb0fb8f9470a94696dc7240bc9adbf402c (diff)
downloadpublic-inbox-d2bbf647026a889700d9a62f79ef0875ca41b39a.tar.gz
Only removing $http->{env} is needed to prevent circular
references.  $env->{'psgix.io'} does not need to be deleted
since $env will no longer have any references to it when
->close returns.
-rw-r--r--lib/PublicInbox/HTTP.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index cd95f4ab..009b5ff0 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -453,9 +453,7 @@ sub quit {
 
 sub close {
         my $self = $_[0];
-        if (my $env = delete $self->{env}) {
-                delete $env->{'psgix.io'}; # prevent circular references
-        }
+        delete $self->{env}; # prevent circular references
         if (my $forward = delete $self->{forward}) {
                 eval { $forward->close };
                 err($self, "forward ->close error: $@") if $@;