Skip to content

Fix force unwrap crash in discover methods#45

Merged
DrAma999 merged 3 commits into
DrAma999:masterfrom
janolife:feature/discovery-fixes
Mar 30, 2026
Merged

Fix force unwrap crash in discover methods#45
DrAma999 merged 3 commits into
DrAma999:masterfrom
janolife:feature/discovery-fixes

Conversation

@CaseyRobinson

Copy link
Copy Markdown
Contributor

Fixed a crash with a forced unwrap I was seeing with testers.

@DrAma999 DrAma999 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello thx.
I understand that force unwrapping is probably not a best practice, but a crash there means that there is no peripheral.
Consider that in that part of the code you are scanning for services and characteristics, this phase can be done only when a peripheral exist, so while this is going to mitigate the issue the actual problem can be elsewhere.

@DrAma999 DrAma999 merged commit b8be234 into DrAma999:master Mar 30, 2026
1 check failed
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