fix(uploader): 修复上传器上下文取消时的资源泄露
构建上传工具 / build-tool (push) Successful in 1m19s

- 在上下文取消时正确关闭 lines channel
- 防止 goroutine 阻塞导致的内存泄露
- 确保所有资源在程序退出时正确释放
This commit is contained in:
2026-04-28 15:44:48 +08:00
parent 73a7d26816
commit a528d6a877
+1
View File
@@ -226,6 +226,7 @@ func processFile(ctx context.Context, logChan *chan string, filePath string, fil
for i := 0; i < config.APPConfig.ThreadCount; i++ {
select {
case <-ctx.Done():
close(lines)
return
default:
go func() {