]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiFinmsg.pm
lei up: only show finmsg in top-level lei-daemon
[public-inbox.git] / lib / PublicInbox / LeiFinmsg.pm
index 0ef5f070201f226bf59dfece4c6564ee223b64f8..395e7d3c7083037b4fbf6e62c67265e09c9b6685 100644 (file)
@@ -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;