X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=13e63215475d771646b068f8aaba437e4d7debee;hp=8e6d3acdb6b56b75d3a2fde7747556e091341302;hb=0579694e4c09339d97c23eb45cc7f41deba8d7b9;hpb=0f262d6879a2aef5751a0f471bf31a322845d8f4 diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 8e6d3ac..13e6321 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.88 2007-09-18 16:57:37 mike Exp $ +# $Id: IRSpy.pm,v 1.90 2008-07-16 11:42:13 mike Exp $ package ZOOM::IRSpy; @@ -230,6 +230,7 @@ sub _next_connection { my $i = $this->{modi}; if (!defined $n) { $target = shift @{ $this->{queue} }; + return undef if !defined $target; } else { while (1) { $target = shift @{ $this->{queue} }; @@ -237,10 +238,11 @@ sub _next_connection { my $h = _hash($target); my $hmodn = $h % $n; last if $hmodn == $i; - $this->log("irspy", "'$target' hash $h % $n = $hmodn != $i"); + #$this->log("irspy", "'$target' hash $h % $n = $hmodn != $i"); } } + die "oops -- target is undefined" if !defined $target; return create ZOOM::IRSpy::Connection($this, $target, async => 1, timeout => $this->{timeout}); }