Browse Source

rename

pull/1444/head
Chris Lu 4 years ago
parent
commit
0be6863c87
  1. 2
      weed/util/log_buffer/log_buffer.go
  2. 4
      weed/util/log_buffer/log_read.go

2
weed/util/log_buffer/log_buffer.go

@ -249,7 +249,7 @@ func (m *LogBuffer) ReadFromBuffer(lastReadTime time.Time) (bufferCopy *bytes.Bu
return nil
}
func (m *LogBuffer) ReleaseMeory(b *bytes.Buffer) {
func (m *LogBuffer) ReleaseMemory(b *bytes.Buffer) {
bufferPool.Put(b)
}

4
weed/util/log_buffer/log_read.go

@ -20,14 +20,14 @@ func (logBuffer *LogBuffer) LoopProcessLogData(
lastReadTime := startTreadTime
defer func() {
if bytesBuf != nil {
logBuffer.ReleaseMeory(bytesBuf)
logBuffer.ReleaseMemory(bytesBuf)
}
}()
for {
if bytesBuf != nil {
logBuffer.ReleaseMeory(bytesBuf)
logBuffer.ReleaseMemory(bytesBuf)
}
bytesBuf = logBuffer.ReadFromBuffer(lastReadTime)
// fmt.Printf("ReadFromBuffer by %v\n", lastReadTime)

Loading…
Cancel
Save