diff options
author | Eric Wong <e@80x24.org> | 2022-12-12 09:58:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-12-12 20:57:56 +0000 |
commit | ed1531f62391e8dd13cb474419a5907a96ba7538 (patch) | |
tree | 073ce188b28416cb5d247994b101519e9541cd8b /lib/PublicInbox | |
parent | 40df0363872f9b34556703221c12bb36ece714d8 (diff) | |
download | public-inbox-ed1531f62391e8dd13cb474419a5907a96ba7538.tar.gz |
It seems more graceful than dying and breaking a mirror, since the {reference} in util-linux was irrelevant anyways with the move to forkgroups.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/LeiMirror.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index d6d2c69e..92156cf1 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -960,9 +960,13 @@ sub clone_all { # resolve multi-level references while ($m && defined($nxt = $m->{$x}->{reference})) { exists($todo->{$nxt}) or last; - die <<EOM if ++$nr > 1000; -E: dependency loop detected (`$x' => `$nxt') + if (++$nr > 1000) { + $m->{$x}->{reference} = undef; + $m->{$nxt}->{reference} = undef; + warn <<EOM +E: dependency loop detected (`$x' => `$nxt'), breaking EOM + } $x = $nxt; } my $y = delete $todo->{$x} // next; # already done |