mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-11 07:57:28 +00:00
fix: ShutdownHook 改为同步等待 vertx.close(),修复 JVM 提前退出导致资源未释放
审查发现 vertx.close() 是异步操作,ShutdownHook 线程提交关闭任务后立即退出, JVM 在资源实际释放前就终止了,与未修复时行为等价。 改为 CompletableFuture.get(10s) 阻塞等待,超时有 warn 日志。 同时移除无用的 mainVertx 字段,修正 JsExecUtils 误导性注释。
This commit is contained in:
@@ -62,7 +62,7 @@ public class JsExecUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 调用执行js文件(复用已缓存的引擎实例,避免每次创建)
|
||||
* 调用执行js文件(使用缓存的 ScriptEngineManager 创建新引擎实例)
|
||||
*/
|
||||
public static Object executeOtherJs(String jsText, String funName, Object ... args) throws ScriptException,
|
||||
NoSuchMethodException {
|
||||
|
||||
Reference in New Issue
Block a user