eduvpn / apple

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

OpenVPN tunnel stops working but app says it's still connected to the VPN #485

Closed roop closed 1 year ago

roop commented 1 year ago

The OpenVPN tunnel sometimes gets to a state where the process is alive but its tunnel is not operating. This happens when the tunnel initiates a reconnect (schedules a reconnect after 1 second) but then initiates a shutdown, so by the time the reconnect-scheduling timer fires, the shouldReconnect flag has been cleared. At this point, the tunnel doesn't reconnect, and doesn't get cancelled -- the tunnel process is alive but it doesn't handle any packets. The last entry in the log says: "Reconnection flag was cleared in the meantime".

roop commented 1 year ago

Just documenting it so we don't forget: The @efef way to reproduce this issue was to connect the Mac through ethernet and wifi, then yank out the ethernet cable and plug it back in many times. I could reproduce this issue a few times using this method, but it doesn't happen all the time.