Skip to content

Commit fb960d0

Browse files
committed
Fix #900
1 parent 9ed320d commit fb960d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/main/scala/com/github/shadowsocks/ShadowsocksRunnerService.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class ShadowsocksRunnerService extends Service with ServiceBoundContext {
5454
}
5555

5656
override def onServiceConnected() {
57-
handler.postDelayed(() => if (bgService != null) {
57+
if (bgService != null) {
5858
if (app.isNatEnabled) startBackgroundService()
5959
else if (VpnService.prepare(ShadowsocksRunnerService.this) == null) startBackgroundService()
60-
stopSelf()
61-
}, 1000)
60+
handler.postDelayed(() => stopSelf(), 10000)
61+
}
6262
}
6363

6464
def startBackgroundService() = bgService.useSync(app.profileId)

0 commit comments

Comments
 (0)