Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
host/logmux: Fix nil cursor panic when reading empty log
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
  • Loading branch information
titanous committed Jan 14, 2019
1 parent 3a91c80 commit 0c23b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/logmux/logmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (m *Mux) addSink(sink Sink) {
l.Error("failed to scan message", "error", err)
return
}
if !cursorSaved && i == len(appLogs[appID])-1 {
if cursor != nil && !cursorSaved && i == len(appLogs[appID])-1 {
// last file, send cursor to processing goroutine
bufferCursorsMtx.Lock()
bufferCursors[appID] = *cursor
Expand Down

0 comments on commit 0c23b67

Please sign in to comment.