Skip to content

Tunnel can't be stopped and started while the NE is running #51

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

Closed
ethanndickson opened this issue Feb 14, 2025 · 0 comments · Fixed by coder/coder#16598
Closed

Tunnel can't be stopped and started while the NE is running #51

ethanndickson opened this issue Feb 14, 2025 · 0 comments · Fixed by coder/coder#16598
Assignees

Comments

@ethanndickson
Copy link
Member

ethanndickson commented Feb 14, 2025

When attempting to implement the NEProvider overrides for starting & stopping the tunnel on device sleep and wake, I noticed that sending the StopRequest to the .dylib causes the entire NE process to SIGABRT. We'll need to fix this if we'd like the VPN to start and stop itself on sleep and wake.

For example, this can be reproduced by modifying the sleep handler:

override func sleep(completionHandler: @escaping -> Void) {
    let completionhandler = CompletionWrapper(completionHandler)
    Task {
         try await manager?.stopVPN()
         completionHandler()
    }
}

Then starting the VPN, and putting the device to sleep. After waking, you'll see an internal error indicating a crash of the NE.

We currently only send the StopRequest when shutting down the tunnel, so this crash can't happen with normal use of the app.

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 a pull request may close this issue.

1 participant