about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-02 00:50:53 +0000
committerEric Wong <e@80x24.org>2019-01-02 00:53:01 +0000
commitd2829e99ba46695c780686142afb68c0d432826b (patch)
treebaa4faf5bb16d62d5c0dc23e7e65a2aa8c4900c6
parent7b7885fc3be2719c068c0a2fc860d53f17a1d933 (diff)
downloadpublic-inbox-d2829e99ba46695c780686142afb68c0d432826b.tar.gz
We can't run cleanup stuff without Danga::Socket.
-rw-r--r--lib/PublicInbox/Inbox.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 706089ca..73f5761a 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -17,6 +17,7 @@ eval {
         require PublicInbox::EvCleanup;
         $cleanup_timer = undef; # OK if we get here
 };
+my $cleanup_broken = $@;
 
 my $CLEANUP = {}; # string(inbox) -> inbox
 sub cleanup_task () {
@@ -31,6 +32,7 @@ sub cleanup_task () {
 
 sub _cleanup_later ($) {
         my ($self) = @_;
+        return if $cleanup_broken;
         return unless PublicInbox::EvCleanup::enabled();
         $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
         $CLEANUP->{"$self"} = $self;