Fix logic to find available next number for limiters and queues. It fixes #3998
This commit is contained in:
parent
fcfa23da8b
commit
8105ffa61c
|
@ -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
|
||||
|
|
Reference in New Issue