Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 20bf457

Browse files
committed
修复:数据收集方法未检测线程池状态,导致关闭线程池后添加任务报错的问题
1 parent cd6bd88 commit 20bf457

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

extender/src/main/java/burp/vaycore/onescan/manager/CollectManager.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static void loadData() {
7575
File dir = new File(sDirPath);
7676
// 第一层目录,主要是主域名和 ip 目录名
7777
File[] parentFiles = dir.listFiles(File::isDirectory);
78-
if (parentFiles == null || parentFiles.length == 0) {
78+
if (parentFiles == null) {
7979
return;
8080
}
8181
for (File parentFile : parentFiles) {
@@ -122,7 +122,12 @@ private static void loadData() {
122122
*/
123123
public static void collect(boolean isRequest, String host, byte[] rawBytes) {
124124
checkInit();
125-
if (host == null || StringUtils.isEmpty(host.trim())) {
125+
if (host == null || StringUtils.isEmpty(host.trim()) ||
126+
rawBytes == null || rawBytes.length == 0) {
127+
return;
128+
}
129+
// 线程池已关闭,不继续执行
130+
if (sThreadPool.isShutdown()) {
126131
return;
127132
}
128133
// 线程处理数据

0 commit comments

Comments
 (0)