diff options
author | Eric Wong <e@80x24.org> | 2021-10-16 01:00:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-16 01:42:52 +0000 |
commit | 7893b78fd691ef1e9b503e44174ff53278b02554 (patch) | |
tree | 2137c1210e761c156d987c94053989c905e2c5da /lib/PublicInbox/LeiXSearch.pm | |
parent | 13e60633b0a4fd31f224bf172c976e8d921ec609 (diff) | |
download | public-inbox-7893b78fd691ef1e9b503e44174ff53278b02554.tar.gz |
Relying on $lei->fail is unsustainable since there'll always be parts of our code and dependencies which can trigger die() and break the event loop.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r-- | lib/PublicInbox/LeiXSearch.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 4aa2a81c..8ab84b15 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -460,10 +460,11 @@ sub do_post_augment { my ($lei) = @_; local $PublicInbox::LEI::current_lei = $lei; my $l2m = $lei->{l2m} or return; # client disconnected - $lei->fchdir or return; - my $err; - eval { $l2m->post_augment($lei) }; - $err = $@; + eval { + $lei->fchdir; + $l2m->post_augment($lei); + }; + my $err = $@; if ($err) { if (my $lxs = delete $lei->{lxs}) { $lxs->wq_kill('-TERM'); |