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(windows): refactor implementation to avoid crashes #564
fix(windows): refactor implementation to avoid crashes #564
Conversation
Add support for more properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a great addition - I had one comment just related to documenting the new device capability
I'll try to pull it and build it locally just to verify but in general LGTM pending doc
Just a note that checking this out locally and building it (with commit from #565 picked locally to run things) - everything seems to work for me. I have no wifi on my test windows VM and it just returns null for those entries FWIW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
## [7.1.8](v7.1.7...v7.1.8) (2022-01-25) ### Bug Fixes * **windows:** refactor implementation to avoid crashes ([#564](#564)) ([cc4bfa3](cc4bfa3))
🎉 This PR is included in version 7.1.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Overview
The existing Windows implementation shared state across multiple threads without proper synchronization and allowed asynchronous NetworkStatusChanged events to access invalid memory during teardown of the module. The shared state wasn't really necessary, so I've streamlined the code to avoid it altogether.
Manual serialization to JSValue has been replaced with the newer macro-based automation. I've also added support for a few netinfo properties that were missing on Windows, though they require the "wiFiControl" capability be specified in the appxmanifest.
Test Plan
Ethernet connection:
WiFi connection: