fix: 修复资源泄漏和空文件上传问题
All checks were successful
构建上传工具 / build-tool (push) Successful in 2m9s

This commit is contained in:
2025-10-17 22:34:25 +08:00
parent 2092fae819
commit ed220996a7
2 changed files with 12 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ func UploadDataToServer(httpClient *http.Client, data string) error {
}
if resp != nil {
_, _ = io.Copy(io.Discard, resp.Body)
resp.Body.Close()
}
return err
}