优化代码

This commit is contained in:
GoEdgeLab
2023-10-02 08:18:43 +08:00
parent 59cca9c6c7
commit 42150681d0
4 changed files with 4 additions and 5 deletions

View File

@@ -138,7 +138,7 @@ func (this *MemoryWriter) Close() error {
func (this *MemoryWriter) Discard() error {
// 需要在Locker之外
defer this.once.Do(func() {
this.endFunc(nil)
this.endFunc(this.item)
})
this.storage.locker.Lock()