X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute.pm;h=769aefe8c01525e2d576540deb150432459bbbbd;hb=a48eea32af123b571889f70a3e7cef8e157cf389;hp=868317a9646234b9093a2598048a3a795f71e8d3;hpb=5547dff2ba68a4c6376be60480a478ae0af25258;p=spider.git diff --git a/perl/Route.pm b/perl/Route.pm index 868317a9..769aefe8 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -295,8 +295,12 @@ sub findroutes dbg("findroutes: $call level: $level calls: " . join(',', @_)) if isdbg('routec'); - # recursion detector + # recursion detector (no point in recursing that deeply) return () if $seen->{$call}; + if ($level >= 20) { + dbg("Route::findroutes: recursion limit reached looking for $call"); + return (); + } # return immediately if we are directly connected if (my $dxchan = DXChannel::get($call)) {