eduvpn / apple

app for iOS and macOS
Other
62 stars 18 forks source link

Fix reconnect issue by preventing a new NESMVPNSession stuck in limbo after disconnect #265

Closed joosth9n closed 4 years ago

joosth9n commented 4 years ago

After a disconnect a Connection Info update (updateConnectionInfo in VPNConnectionViewController) would start a new NETunnelProviderSession getting stuck in limbo, which causes an "Extension died unexpectedly" error after a timeout of 20 seconds and preventing a new connect. This fix just empties the Connection Info when disconnecting and returns without calling a new NETunnelProviderSession.

Removing "self.currentManager = NETunnelProviderManager()" prevents a NEVPNStatus of "invalid" and is not necessary anymore with this fix.

jeroenleenarts commented 4 years ago

Looks good to me.

jeroenleenarts commented 4 years ago

I will fix the CI failure in a follow up pull request.