lib/PublicInbox/Inbox.pm | 8 ++------ diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index aa4e141f6cfcd36a67bca71893a6363b8b0005c7..51ada0bc390458df9a992ff77ca934097293db60 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -22,12 +22,6 @@ delete $_->{git} for values %$CLEANUP; $CLEANUP = {}; } -sub _cleanup_later ($) { - my ($self) = @_; - $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task); - $CLEANUP->{"$self"} = $self; -} - sub _set_uint ($$$) { my ($opts, $field, $default) = @_; my $val = $opts->{$field}; @@ -76,6 +70,8 @@ my ($self) = @_; $self->{git} ||= eval { my $g = PublicInbox::Git->new($self->{mainrepo}); $g->{-httpbackend_limiter} = $self->{-httpbackend_limiter}; + $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task); + $CLEANUP->{"$self"} = $self; $g; }; }