Skip to content

host: prevent timing issue if indication ack is received before proc being inserted #2011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DamienEspitallier
Copy link

I am using nimBLE on an ESP32 project.

Due to high CPU usage and (maybe wrong ?) task priority configuration, I sometimes have ble_gatts_rx_indicate_rsp not finding the proc because it is called before ble_gatts_indicate_custom has a chance to call ble_gattc_process_status.

This lead nimble to closes the connection 30s later as the proc timer expires.

This PR proposes to add the proc to the list before calling the tx function, and remove it if tx fails.

@github-actions github-actions bot added host size/S Small PR labels Mar 14, 2025
@DamienEspitallier DamienEspitallier changed the title host: prevent timing issue if indication ack is received before proc host: prevent timing issue if indication ack is received before proc being inserted Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant