[Fix crash] Image loading fails due to network error for instance shut down metro while app is running #15428
+423
−348
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.
Description
Fix crash when image loading fails due to network error for instance shut down metro while app is running
Type of Change
Why
Maintains app lifecycle and gracefully handle network issues while loading image for example RN logbox.
Resolves [Add Relevant Issue Here]
#15427
What
Added lessthrow_await_adapter for HTTP requests instead of direct co_await
and Check asyncOp.Status on error/cancel
Added null check for m_responseHeaders before iteration.
Screenshots
app_network_imagemanager_fix.mp4
Testing
tested in playground and sample app fabric
Changelog
Should this change be included in the release notes: _indicate yes
Add a brief summary of the change to use in the release notes for the next release.
Fixed app crash when loading images with no network connection
Microsoft Reviewers: Open in CodeFlow