oopsie ... off-by-one potentially causing unbalanced session use
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 6 Apr 2006 01:03:04 +0000 (01:03 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 6 Apr 2006 01:03:04 +0000 (01:03 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@679 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/MultiSession.pm

index 8b04732..9157cec 100644 (file)
@@ -177,7 +177,7 @@ sub request {
 
        if ($self->running < $self->request_cap ) {
                my $index = $self->session_hash_function->($self, $method, @params);
-               my $ses = $self->{sessions}->[($index % $self->session_cap ) - 1]; 
+               my $ses = $self->{sessions}->[$index % $self->session_cap]; 
 
                #print "Running $method using session ".$ses->session_id."\n";