]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiRefreshMailSync.pm
lei: do not access {sock} after SIGPIPE
[public-inbox.git] / lib / PublicInbox / LeiRefreshMailSync.pm
index eb842843b51dece6664aad113e26efa4d22b4096..f516f5725f6eb17eeb7f888661b17b831633dd97 100644 (file)
@@ -82,7 +82,7 @@ EOM
        $lei->{opt}->{'mail-sync'} = 1; # for prepare_inputs
        $self->prepare_inputs($lei, \@folders) or return;
        my $ops = {};
-       $lei->{auth}->op_merge($ops, $self) if $lei->{auth};
+       $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth};
        (my $op_c, $ops) = $lei->workers_start($self, 1, $ops);
        $lei->{wq1} = $self;
        $lei->{-err_type} = 'non-fatal';
@@ -101,7 +101,7 @@ sub _complete_refresh_mail_sync {
        my ($lei, @argv) = @_;
        my $lms = $lei->lms or return ();
        my $match_cb = $lei->complete_url_prepare(\@argv);
-       my @k = $lms->folders($argv[-1], 1);
+       my @k = $lms->folders($argv[-1] // undef, 1);
        my @m = map { $match_cb->($_) } @k;
        @m ? @m : @k
 }