Merge branch 'bugfix/fix_gattc_disc_cmpl_stranded_read' into 'master'

fix(ble/bluedroid): set REQ_WAITING before GATTC service-change rediscovery

Closes BLERP-2925

See merge request espressif/esp-idf!49940
This commit is contained in:
Island
2026-06-26 16:52:06 +08:00
@@ -1153,7 +1153,9 @@ void bta_gattc_disc_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
}
if (p_clcb->auto_update == BTA_GATTC_DISC_WAITING) {
/* start discovery again */
/* Service change arrived during discovery; restart even if p_q_cmd is set.
* Mirrors bta_gattc_op_cmpl(). */
p_clcb->auto_update = BTA_GATTC_REQ_WAITING;
bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
}
/* get any queued command to proceed */