-
Notifications
You must be signed in to change notification settings - Fork 17
bug: racing condition when setting isRestartInProgress #43
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
base: main
Are you sure you want to change the base?
Conversation
…onitor queue's context
Fixes white bar showing up on versions prior to iOS 16
WalkthroughMoved navigation-bar modifiers from the outer NavigationView into the inner content view, deferred restart-state flag resets in PacketTunnelProvider.restartClient onto monitorQueue.async, and bumped the NetBird project CURRENT_PROJECT_VERSION from 15 to 16. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
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. Comment |
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.
Pull request overview
This PR fixes a race condition in network restart handling and resolves a navigation drawer display issue on iOS versions prior to 16.
- Ensures thread-safe access to
isRestartInProgressandadapter.isRestartingflags by dispatching modifications to the designatedmonitorQueue - Corrects SwiftUI modifier placement for navigation bar configuration to support iOS <16
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| NetbirdNetworkExtension/PacketTunnelProvider.swift | Wraps flag resets in monitorQueue.async block to prevent race conditions when adapter callbacks complete on non-monitor threads |
| NetBird/Source/App/Views/MainView.swift | Moves navigation bar modifiers from NavigationView to content ZStack for proper iOS <16 compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also solves UI issue for iOS prior to 16 to display the navigation drawer
Summary by CodeRabbit
Refactor
Chores
✏️ Tip: You can customize this high-level summary in your review settings.