about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/LeiFinmsg.pm4
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;