Skip to content

Commit 600fb04

Browse files
committed
remove countdownlauch
1 parent 8cbda82 commit 600fb04

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

app/src/main/java/com/github/jsbxyyx/xbook/LifecycleApplication.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public void onCreate() {
5656
SPUtils.putData(getBaseContext(), Common.sync_key, syncData);
5757
}
5858

59-
CountDownLatch latch = new CountDownLatch(1);
6059
ipNetHelper.fetchIP(new DataCallback<List<Ip>>() {
6160
@Override
6261
public void call(List<Ip> ips, Throwable err) {
@@ -65,13 +64,8 @@ public void call(List<Ip> ips, Throwable err) {
6564
}
6665
Common.setIPS(ips);
6766
LogUtil.d(getClass().getSimpleName(), "set ips : %s", Common.getIPS().size());
68-
latch.countDown();
6967
}
7068
});
71-
try {
72-
latch.await();
73-
} catch (InterruptedException e) {
74-
}
7569

7670
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
7771
@Override

0 commit comments

Comments
 (0)