]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: Update realtime queuemembers after wait_a_bit(), not before
authorlvl <digium@lvlconsultancy.nl>
Mon, 3 Sep 2018 11:28:26 +0000 (13:28 +0200)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 5 Sep 2018 23:25:04 +0000 (18:25 -0500)
This ensures the most up-to-date information is used for the next
call attempt.

ASTERISK-28032

Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce

apps/app_queue.c

index 292fad24ac8836033fff97317aa0eb8ce6659b05..32a979e76f3a967a490e41574284e77ea2a1cf04 100644 (file)
@@ -8332,14 +8332,15 @@ check_turns:
                        break;
                }
 
-               /* If using dynamic realtime members, we should regenerate the member list for this queue */
-               update_realtime_members(qe.parent);
                /* OK, we didn't get anybody; wait for 'retry' seconds; may get a digit to exit with */
                res = wait_a_bit(&qe);
                if (res) {
                        goto stop;
                }
 
+               /* If using dynamic realtime members, we should regenerate the member list for this queue */
+               update_realtime_members(qe.parent);
+
                /* Since this is a priority queue and
                 * it is not sure that we are still at the head
                 * of the queue, go and check for our turn again.