diff options
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 368eee26..977a94c6 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1367,16 +1367,8 @@ sub lazy_start { $quit->(); } return 1 if defined($path); - my $n = 0; - for my $s (values %$dmap) { - $s->can('busy') or next; - if ($s->busy) { - ++$n; - } else { - $s->close; - } - } - drop_all_stores() if !$n; # drop stores only if no clients + my $n = PublicInbox::DS::close_non_busy() or + drop_all_stores(); # drop stores only if no clients # returns true: continue, false: stop $n + scalar(keys(%$PublicInbox::DS::AWAIT_PIDS)); }); |