]> Sergey Matveev's repositories - public-inbox.git/commitdiff
daemon: set $SIG{__WARN__} properly
authorEric Wong <e@80x24.org>
Wed, 13 Oct 2021 02:48:59 +0000 (02:48 +0000)
committerEric Wong <e@80x24.org>
Wed, 13 Oct 2021 04:13:40 +0000 (04:13 +0000)
Eml->warn_ignore_cb itself returns a callback, so creating a
reference to it was wrong when assigning it to $SIG{__WARN__};

Fixes: 176cd51f9aa81b74 ("daemon: quiet down Eml-related warnings")
lib/PublicInbox/Daemon.pm

index 5c64e84cca4ae15f274b1b43d744c0103a1a67a5..90b77412f96a06f3be0824d30868b5ff20b37550 100644 (file)
@@ -643,7 +643,7 @@ sub run ($$$;$) {
        # localize GCF2C for tests:
        local $PublicInbox::GitAsyncCat::GCF2C;
        local $PublicInbox::Git::async_warn = 1;
-       local $SIG{__WARN__} = \&PublicInbox::Eml::warn_ignore_cb;
+       local $SIG{__WARN__} = PublicInbox::Eml::warn_ignore_cb();
 
        daemon_loop($refresh, $post_accept, $tlsd, $af_default);
        PublicInbox::DS->Reset;