Skip to content

Commit 1bb8a10

Browse files
committed
ui: remove unnecessary boolean check
This check was added in 3c31c34 when the kernel module loader was introduced into the app lifecycle, to avoid attempting to start a root shell twice. When the module loader was removed in a03ad51, this flag was accidentally left in when it should have been deleted. Signed-off-by: Harsh Shandilya <[email protected]>
1 parent f3230fc commit 1bb8a10

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ui/src/main/java/com/wireguard/android/Application.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ class Application : android.app.Application() {
6464

6565
private suspend fun determineBackend(): Backend {
6666
var backend: Backend? = null
67-
var didStartRootShell = false
6867
if (UserKnobs.enableKernelModule.first() && WgQuickBackend.hasKernelSupport()) {
6968
try {
70-
if (!didStartRootShell)
71-
rootShell.start()
69+
rootShell.start()
7270
val wgQuickBackend = WgQuickBackend(applicationContext, rootShell, toolsInstaller)
7371
wgQuickBackend.setMultipleTunnels(UserKnobs.multipleTunnels.first())
7472
backend = wgQuickBackend

0 commit comments

Comments
 (0)