Skip to content

Commit

Permalink
fix panic in JSON handle when first line looking like JSON isnt
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Apr 21, 2015
1 parent 20c0618 commit 633daad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion json_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ func (h *JSONHandler) clear() {
h.Message = ""
h.last = h.Fields
h.Fields = make(map[string]string)
h.buf.Reset()
if h.buf != nil {
h.buf.Reset()
}
}

// TryHandle tells if this line was handled by this handler.
Expand Down

0 comments on commit 633daad

Please sign in to comment.