Skip to content

Initialize semaphore with braces in NimBLEUtils - #437

Merged
h2zero merged 1 commit into
h2zero:masterfrom
doudar:master
Aug 8, 2026
Merged

Initialize semaphore with braces in NimBLEUtils#437
h2zero merged 1 commit into
h2zero:masterfrom
doudar:master

Conversation

@doudar

@doudar doudar commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Fixes a connect crash in the client

Summary by CodeRabbit

  • Refactor
    • Improved initialization of internal semaphore objects without changing observable application behavior.

Fixes a connect crash in the client
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89611ecf-ace8-4931-b2ef-41da3e1adead

📥 Commits

Reviewing files that changed from the base of the PR and between 782af27 and 9fae15e.

📒 Files selected for processing (1)
  • src/NimBLEUtils.cpp

📝 Walkthrough

Walkthrough

Arrr, taskWait now value-initializes newly allocated semaphore objects. The remaining semaphore setup, error handling, storage, and wait flow remain unchanged.

Changes

Semaphore initialization

Layer / File(s) Summary
Update semaphore allocation
src/NimBLEUtils.cpp
taskWait uses brace initialization for newly allocated semaphore objects. Subsequent initialization and waiting logic remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • h2zero/esp-nimble-cpp#421: Arrr, this PR previously refactored NimBLEUtils.cpp::taskWait to allocate and wait on tracked semaphores.

Poem

A brace sets sail, arrr,
The semaphore wakes whole,
taskWait keeps its course,
No runtime waves arise,
The code rests shipshape.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the semaphore initialization change in NimBLEUtils.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@h2zero

h2zero commented Aug 8, 2026

Copy link
Copy Markdown
Owner

LGTM thanks!

@h2zero
h2zero merged commit f04e1ef into h2zero:master Aug 8, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants