about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdxFork.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/OverIdxFork.pm')
-rw-r--r--lib/PublicInbox/OverIdxFork.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/PublicInbox/OverIdxFork.pm b/lib/PublicInbox/OverIdxFork.pm
index f4f7cddd..ec965280 100644
--- a/lib/PublicInbox/OverIdxFork.pm
+++ b/lib/PublicInbox/OverIdxFork.pm
@@ -135,9 +135,12 @@ sub barrier_init {
 
 sub barrier_wait {
         my ($self) = @_;
-        my $bw = $self->{barrier_wait} or return;
-        my $l = $bw->getline;
-        $l eq "barrier_done\n" or die "bad response from barrier_wait: $l\n";
+        if (my $bw = $self->{barrier_wait}) {
+                my $l = $bw->getline;
+                $l eq "barrier_done\n" or die "bad response from barrier_wait: $l\n";
+        } else {
+                $self->commit_lazy;
+        }
 }
 
 sub remote_commit {
@@ -174,10 +177,4 @@ sub remote_close {
         }
 }
 
-sub commit_fsync {
-        my ($self) = @_;
-        return if $self->{w}; # don't bother; main parent can also call this
-        $self->SUPER::commit_fsync;
-}
-
 1;