Skip to content
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

Disconnects while connected through VPN #623

Open
agners opened this issue Jul 4, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@agners
Copy link

commented Jul 4, 2018

I am using Wireguard as a VPN. Wireguard uses UDP and reconnects automatically, TCP connections through it usually stay alive. However, when using ConnectBot connections get disconnected when roaming from WiFi to 4G. This seems to be caused by ConnectBot itself. The ConnectivityManager reports for a short period that there is no connectivity, which causes ConnectBot to kill all connections:

07-05 01:07:09.438 13773 13773 D CB.ConnectivityManager: onReceived() called; noConnectivity? true; isFailover? false
07-05 01:07:09.483 13773 13773 D CB.ConnectivityManager: onReceived() called; noConnectivity? false; isFailover? false

Android nowadays uses SOCK_DESTROY to close sockets depending on which interface the TCP has been useing. It seems that manual handling as it is used in ConnectBot is not ideal and no longer necessary.

agners added a commit to agners/connectbot that referenced this issue Jul 5, 2018

Do not drop connections if Android reports no connectivity
Android (netd) kills TCP connections if addresses go away since
Android 5.x (Lollipop). Actively killing connection is unecessary
and in some situations even harmful, e.g. when using localhost
connections or if a VPN is present which will reconnect on its
own.

Fixes connectbot#623 and connectbot#599.

@agners agners referenced a pull request that will close this issue Jul 5, 2018

Open

Do not drop connections if Android reports no connectivity #624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.