Skip to content

Commit 7c65568

Browse files
committed
Fixed: Tailscale will not reconnect to the Tailscale network after using another VPN until Tailscale app is force closed because currentState=Ipn.State.Stopping on subsequent attempts to start TS
1 parent 94f2829 commit 7c65568

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ If you installed Android Studio the tools may not be in your path. To get the
5353
correct tool path, run `make androidpath` and export the provided path in your
5454
shell.
5555

56+
You will also need to run `make llibtailscale` to build the Tailscale AAR which is required to build the Android app.
57+
5658
#### Code Formatting
5759

5860
The ktmft plugin on the default setting should be used to autoformat all Java, Kotlin

android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ android {
8585
buildConfigField "String", "GITHUB_2FA_SECRET", "\"" + getLocalProperty("github2FASecret", "")+"\""
8686
}
8787
debug {
88+
applicationIdSuffix ".debug"
8889
manifestPlaceholders.leanbackRequired = false
8990
}
9091
release {

android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ class MainViewModel(private val appViewModel: AppViewModel) : IpnViewModel() {
210210
val currentState = Notifier.state.value
211211

212212
if (desiredState) {
213+
if (currentState != Ipn.State.Stopped) {
214+
stopVPN()
215+
}
216+
213217
// User wants to turn ON the VPN
214218
when {
215219
currentState != Ipn.State.Running -> startVPN()

0 commit comments

Comments
 (0)