diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ace981..45c5bb5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ All notable changes to paopao-ce are documented in this file. ... ``` +## 0.4.2 +### Fixed +- fixed remove multi-objects no effects and occurs resource leak error when use Minio as OSS(Object Storage System).[#371](https://github.com/rocboss/paopao-ce/pull/371) [#372](https://github.com/rocboss/paopao-ce/pull/372) + ## 0.4.1 ### Changed - infinite scrolling instead of pagination for Home/User/Profile page diff --git a/internal/dao/storage/minio.go b/internal/dao/storage/minio.go index 3859a5b7..028e331a 100644 --- a/internal/dao/storage/minio.go +++ b/internal/dao/storage/minio.go @@ -140,6 +140,8 @@ func (s *minioServant) DeleteObjects(objectKeys []string) (err error) { Key: objectKey, } } + // 记得一定要close,否则会被卡死,退出不了函数,造成资源泄露!!! + close(objectsCh) // 宽松处理所有错误,只记录最后一次发生的错误 for result := range resCh {