Skip to content

Fix AppTP unregister crash#9114

Open
joshliebe wants to merge 1 commit into
developfrom
feature/josh/app-tp-unregister-crash
Open

Fix AppTP unregister crash#9114
joshliebe wants to merge 1 commit into
developfrom
feature/josh/app-tp-unregister-crash

Conversation

@joshliebe

@joshliebe joshliebe commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1200204095367872/task/1216284733725748?focus=true
Tech Design URL (if applicable):

Description

  • Fixes a crash when disabling AppTP

Steps to test this PR

  • Enable AppTP
  • Disable AppTP
  • Verify AppTP is disabled without crash

Note

Low Risk
Small lifecycle guard around VPN DNS monitoring; no change to when DNS changes trigger VPN restarts.

Overview
Fixes an AppTP crash when DnsChangeCallback calls unregisterNetworkCallback without a matching prior registration (e.g. VPN restart/stop paths that invoke unregister() more than once or when the Moto G DNS listener was never registered).

DnsChangeCallback now tracks a registered flag: register() is a no-op if already registered and only sets the flag after a successful registerNetworkCallback; unregister() skips when not registered and clears the flag after the unregister attempt (including on failure).

Reviewed by Cursor Bugbot for commit 1d6a615. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@joshliebe joshliebe force-pushed the feature/josh/app-tp-unregister-crash branch from 95e43eb to 1d6a615 Compare July 6, 2026 12:17
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