This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c9c5db  [ISSUE #922]close file after it was read in internal fiel 
utils.
4c9c5db is described below

commit 4c9c5dbf2a4ef38ef70e54d6f7ed4528ecff06fc
Author: 子非鱼 <[email protected]>
AuthorDate: Tue Sep 27 20:32:50 2022 +0800

    [ISSUE #922]close file after it was read in internal fiel utils.
---
 internal/utils/files.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/internal/utils/files.go b/internal/utils/files.go
index 2583d11..1cb849b 100644
--- a/internal/utils/files.go
+++ b/internal/utils/files.go
@@ -38,6 +38,7 @@ func FileReadAll(path string) ([]byte, error) {
        if err != nil {
                return nil, err
        }
+       CheckError(fmt.Sprintf("close %s", file.Name()), file.Close())
        return data, nil
 }
 

Reply via email to