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 fcfa23da8b
commit 8105ffa61c
1 changed files with 2 additions and 2 deletions

View File

@ -4409,7 +4409,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
@ -4435,7 +4435,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