topret opened a new issue #498:
URL: https://github.com/apache/rocketmq-client-go/issues/498
1. bug 描述: "persist offset to .rocketmq_client_go offset.json: The process
cannot access the file because it is being used by another process.
1. bug 产生原因: FileReadAll 后没有关闭文件,导致文件不能被删除和改名
1. 处理:
1.1 FileReadAll 在 os.Open(path) 之后 增加 defer file.Close()
1.2. WriteToFile
把 if err != nil {
_, err = bakFile.Write(prevContent)
}
修改为 if err == nil
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]