Steps to reproduce:
- Open APN VPN app and connect to VPN (status becomes "Connected").
- Go to system settings → Network & internet → VPN → tap "Forget" (or disconnect) for the APN VPN profile.
- Return to the app.
Expected result:
App immediately switches to "Disconnected" state and stops all connection attempts.
Actual result:
App continues to show "Connecting..." status and keeps sending network requests. Logs show repeated Connecting... lines and ConnectException: Network is unreachable errors after the system has revoked the VPN profile.
Logs (example):
07-16 01:57:27.157 1407 9782 W APN : Непредвиденная ошибка ConnectException: «Network is unreachable»
07-16 01:57:31.148 1407 1407 I APN : Connecting...
07-16 01:57:31.197 1407 9782 W APN : Непредвиденная ошибка ConnectException: «Network is unreachable»
...
Root cause (based on code analysis):
In APNService.onRevoke() the connection flag (f9588i) is not reset and ongoing coroutines are not cancelled, so the service keeps retrying to reconnect even after the system has removed the VPN profile.
Steps to reproduce:
Expected result:
App immediately switches to "Disconnected" state and stops all connection attempts.
Actual result:
App continues to show "Connecting..." status and keeps sending network requests. Logs show repeated
Connecting...lines andConnectException: Network is unreachableerrors after the system has revoked the VPN profile.Logs (example):
07-16 01:57:27.157 1407 9782 W APN : Непредвиденная ошибка ConnectException: «Network is unreachable»
07-16 01:57:31.148 1407 1407 I APN : Connecting...
07-16 01:57:31.197 1407 9782 W APN : Непредвиденная ошибка ConnectException: «Network is unreachable»
...
Root cause (based on code analysis):
In
APNService.onRevoke()the connection flag (f9588i) is not reset and ongoing coroutines are not cancelled, so the service keeps retrying to reconnect even after the system has removed the VPN profile.