diff options
author | Eric Wong <e@80x24.org> | 2021-08-31 19:38:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-31 20:08:05 +0000 |
commit | 66ac16e2afe11100f1e359d04da399589af05d31 (patch) | |
tree | 7597561d9ac22bc49f69883a9edd3245866cec90 | |
parent | 01357ab43ba32d9e0967226ed03106a4f2941f23 (diff) | |
download | public-inbox-66ac16e2afe11100f1e359d04da399589af05d31.tar.gz |
->DESTROY can get triggered in child processes, which unnecessarily duplicates messages queued up for display when lei spawns extra workers.
-rw-r--r-- | lib/PublicInbox/LeiFinmsg.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiFinmsg.pm b/lib/PublicInbox/LeiFinmsg.pm index 0ef5f070..395e7d3c 100644 --- a/lib/PublicInbox/LeiFinmsg.pm +++ b/lib/PublicInbox/LeiFinmsg.pm @@ -9,13 +9,13 @@ use v5.10.1; sub new { my ($cls, $io) = @_; - bless [ $io ], $cls; + bless [ $io, $$ ], $cls; } sub DESTROY { my ($self) = @_; my $io = shift @$self; - print $io @$self; + shift(@$self) == $$ and print $io @$self; } 1; |