From 10ee3548084c125f20fe2c830faea2a43413be92 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Jun 2020 23:21:12 +0000 Subject: git_async_cat: remove circular reference 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. --- lib/PublicInbox/Git.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/Git.pm') 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)); -- cgit v1.2.3-24-ge0c7