Fix logic to find available next number for limiters and queues. It fixes #3998

This commit is contained in:
Renato Botelho 2014-11-13 10:09:41 -02:00
parent 340ce958d9
commit 89cf3dc0b6
1 changed files with 2 additions and 2 deletions

View File

@ -4430,7 +4430,7 @@ function dnqueue_find_nextnumber() {
$found = false;
foreach ($dnused as $dnnum) {
if (($dnnum - $dnnumber) > 1) {
$dnnumber = $dnnum + 1;
$dnnumber = $dnnum - 1;
$found = true;
break;
} else
@ -4456,7 +4456,7 @@ function dnpipe_find_nextnumber() {
$found = false;
foreach ($dnused as $dnnum) {
if (($dnnum - $dnnumber) > 1) {
$dnnumber = $dnnum + 1;
$dnnumber = $dnnum - 1;
$found = true;
break;
} else