Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Imre Kristoffer Eilertsen
Nebulo
Commits
4def4175
Commit
4def4175
authored
Jun 03, 2021
by
Daniel Wolf
Browse files
Reduce watchdog invoke count
parent
823633a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/service/VpnWatchDog.kt
View file @
4def4175
...
...
@@ -45,7 +45,7 @@ class VpnWatchDog(private val onVpnDisconnected:() -> Unit,
}
private
suspend
fun
checkConnection
()
{
delay
(
3000
)
delay
(
3000
0
)
log
(
"Beginning VPN-check"
)
val
networks
=
connectivityManager
.
allNetworks
.
toList
().
filterNotNull
()
val
isStillRunning
=
networks
.
any
{
connectivityManager
.
isVpnNetwork
(
it
)
}
||
networks
.
isEmpty
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment