We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed320d commit fb960d0Copy full SHA for fb960d0
src/main/scala/com/github/shadowsocks/ShadowsocksRunnerService.scala
@@ -54,11 +54,11 @@ class ShadowsocksRunnerService extends Service with ServiceBoundContext {
54
}
55
56
override def onServiceConnected() {
57
- handler.postDelayed(() => if (bgService != null) {
+ if (bgService != null) {
58
if (app.isNatEnabled) startBackgroundService()
59
else if (VpnService.prepare(ShadowsocksRunnerService.this) == null) startBackgroundService()
60
- stopSelf()
61
- }, 1000)
+ handler.postDelayed(() => stopSelf(), 10000)
+ }
62
63
64
def startBackgroundService() = bgService.useSync(app.profileId)
0 commit comments