mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-11 07:57:28 +00:00
fix: Deploy配置读取失败时主线程永久阻塞
BUG-05: 配置读取失败时仅调用printStackTrace,未调用LockSupport.unpark() 导致主线程永远阻塞在LockSupport.park() 现在失败时记录错误日志、unpark主线程并退出进程
This commit is contained in:
@@ -65,7 +65,11 @@ public final class Deploy {
|
|||||||
// 读取yml配置
|
// 读取yml配置
|
||||||
ConfigUtil.readYamlConfig(path.toString(), tempVertx)
|
ConfigUtil.readYamlConfig(path.toString(), tempVertx)
|
||||||
.onSuccess(this::readConf)
|
.onSuccess(this::readConf)
|
||||||
.onFailure(Throwable::printStackTrace);
|
.onFailure(err -> {
|
||||||
|
LOGGER.error("读取配置文件失败: {}", err.getMessage(), err);
|
||||||
|
LockSupport.unpark(mainThread);
|
||||||
|
System.exit(-1);
|
||||||
|
});
|
||||||
LockSupport.park();
|
LockSupport.park();
|
||||||
deployVerticle();
|
deployVerticle();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user