Skip to content

Commit

Permalink
在dir模式下,文件采集出现 倒序的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
shangmin-001 committed May 28, 2021
1 parent eb01537 commit ce6296e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reader/dirx/dir_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (dr *dirReader) Run() {

if err == nil && dr.halfLineCache[source] != "" {
dr.readLock.Lock()
dr.readcache += dr.halfLineCache[source]
dr.readcache = dr.halfLineCache[source] + dr.readcache
dr.halfLineCache[source] = ""
dr.readLock.Unlock()
}
Expand Down
2 changes: 1 addition & 1 deletion reader/tailx/tailx.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (ar *ActiveReader) Run() {

if err == nil && ar.halfLineCache[source] != "" {
ar.cacheLineMux.Lock()
ar.readcache += ar.halfLineCache[source]
ar.readcache = ar.halfLineCache[source] + ar.readcache
ar.halfLineCache[source] = ""
ar.cacheLineMux.Unlock()
}
Expand Down

0 comments on commit ce6296e

Please sign in to comment.