[DSDK-620] Fix LLD crash (race condition in transport registration) #8729
+110
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✅ Checklist
npx changeset
was attached.ldmkTransport
feature flag)📝 Description
Sentry issue: https://ledger.sentry.io/issues/6147489966/?project=6488660&query=release:2.94.0
Two things:
getFeature
return type wasany
, which allowed an error to slip through: checking the value ofnull.enabled
.The result is a crash that would have looked like this for a user:
The fix:
getFeature
to returnFeature | null
.withDevice
is called. This is not really a new logic,withDevice
has been conceived to work like this.❓ Context
🧐 Checklist for the PR Reviewers