about summary refs log tree commit homepage
path: root/lib/PublicInbox/Git.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-23 23:21:12 +0000
committerEric Wong <e@yhbt.net>2020-06-25 05:37:59 +0000
commit10ee3548084c125f20fe2c830faea2a43413be92 (patch)
treecb71ebd707af3b6b5e7a2854de35039af16cb5bf /lib/PublicInbox/Git.pm
parentf977826a17f8735e6947dd2da380df8c6d0b38d8 (diff)
downloadpublic-inbox-10ee3548084c125f20fe2c830faea2a43413be92.tar.gz
While this circular reference was carefully managed to not leak
memory; it was still triggering a warning at -imapd/-nntpd
shutdown due to the EPOLL_CTL_DEL op failing after the $Epoll FD
gets closed.

So remove the circular reference by providing a ref to `undef',
instead.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r--lib/PublicInbox/Git.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index a55c48d5..776e4832 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -295,9 +295,7 @@ sub qx {
 sub cleanup {
         my ($self) = @_;
         local $in_cleanup = 1;
-        if (my $ac = $self->{async_cat}) {
-                $ac->close; # PublicInbox::GitAsyncCat::close -> EPOLL_CTL_DEL
-        }
+        delete $self->{async_cat};
         cat_async_wait($self);
         _destroy($self, qw(cat_rbuf in out pid));
         _destroy($self, qw(chk_rbuf in_c out_c pid_c err_c));