diff options
author | Eric Wong <e@yhbt.net> | 2020-06-23 23:21:12 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-25 05:37:59 +0000 |
commit | 10ee3548084c125f20fe2c830faea2a43413be92 (patch) | |
tree | cb71ebd707af3b6b5e7a2854de35039af16cb5bf /lib/PublicInbox/NNTP.pm | |
parent | f977826a17f8735e6947dd2da380df8c6d0b38d8 (diff) | |
download | public-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/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 6df19f32..76f14bbd 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -553,8 +553,7 @@ sub cmd_article ($;$) { return $smsg unless ref $smsg; set_art($self, $art); $smsg->{nntp} = $self; - git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg); - undef; + ${git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg)}; } sub cmd_head ($;$) { @@ -564,8 +563,7 @@ sub cmd_head ($;$) { set_art($self, $art); $smsg->{nntp} = $self; $smsg->{nntp_code} = 221; - git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg); - undef; + ${git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg)}; } sub cmd_body ($;$) { @@ -575,8 +573,7 @@ sub cmd_body ($;$) { set_art($self, $art); $smsg->{nntp} = $self; $smsg->{nntp_code} = 222; - git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg); - undef; + ${git_async_cat($self->{ng}->git, $smsg->{blob}, \&blob_cb, $smsg)}; } sub cmd_stat ($;$) { |