Skip to content
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

Fix task blocking #753

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Fix task blocking #753

merged 3 commits into from
Nov 14, 2024

Commits on Nov 14, 2024

  1. Refactor NimBLEUtils::taskWait to check notification value before blo…

    …cking.
    
    Instead of incrementing the notificatin value via `xTaskNotifyGive` this will now set a specific bit in the task notification value
    which will be tested before blocking a task. This will prevent a task from blocking indefinitely if the event that calls `taskRelease`
    occurs before entering the blocked state.
    
    * Adds a config setting for the bit to set in the task notification value.
    h2zero committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    85093c6 View commit details
    Browse the repository at this point in the history
  2. Set task handle in constructor of NimBLETaskData.

    * Create destructor for NimBLETaskData to delete semaphore if created.
    h2zero committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    8df3b39 View commit details
    Browse the repository at this point in the history
  3. Refactor NimBLEClient::connect and NimBLEClient::secureConnection.

    This change ensures that only the function that sets `m_pTaskData` clears it, potentially preventing a segmentation fault.
    
    * Client will no longer disconnect if task timeout occurs when waiting for MTU exchange response.
    h2zero committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    8d73ad6 View commit details
    Browse the repository at this point in the history