From: miker Date: Thu, 6 Apr 2006 01:03:04 +0000 (+0000) Subject: oopsie ... off-by-one potentially causing unbalanced session use X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5266e8e33eb832b3b138d0b8a88ea1362c9398c6;p=opensrf%2Fbjwebb.git oopsie ... off-by-one potentially causing unbalanced session use git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@679 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/MultiSession.pm b/src/perlmods/OpenSRF/MultiSession.pm index 8b04732..9157cec 100644 --- a/src/perlmods/OpenSRF/MultiSession.pm +++ b/src/perlmods/OpenSRF/MultiSession.pm @@ -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";