From: lvl Date: Mon, 3 Sep 2018 11:28:26 +0000 (+0200) Subject: app_queue: Update realtime queuemembers after wait_a_bit(), not before X-Git-Tag: 13.24.0-rc1~118^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eda1af091ef92d9ea4143a290fb8323cdf801e12;p=thirdparty%2Fasterisk.git app_queue: Update realtime queuemembers after wait_a_bit(), not before This ensures the most up-to-date information is used for the next call attempt. ASTERISK-28032 Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 12f09ec3e3..6bc2e67161 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -8145,14 +8145,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.