Browse Source

wait for data

pull/5637/head
chrislu 10 months ago
parent
commit
054d0b3487
  1. 14
      weed/util/log_buffer/log_read.go

14
weed/util/log_buffer/log_read.go

@ -66,16 +66,20 @@ func (logBuffer *LogBuffer) LoopProcessLogData(readerName string, startPosition
isDone = true isDone = true
return return
} }
if waitForDataFn() {
continue
} else {
isDone = true
return
lastTsNs := logBuffer.LastTsNs
for lastTsNs == logBuffer.LastTsNs {
if waitForDataFn() {
continue
} else {
isDone = true
return
}
} }
if logBuffer.IsStopping() { if logBuffer.IsStopping() {
isDone = true isDone = true
return return
} }
continue
} }
buf := bytesBuf.Bytes() buf := bytesBuf.Bytes()

Loading…
Cancel
Save