Skip to content

Commit 414de21

Browse files
author
anahan
committed
Check parser state on timer in phpfpm/SlowLog parser
1 parent 5aa24e6 commit 414de21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/phpfpm/slowlog_parser.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ func (slp *SlowlogParser) Parse(ctx context.Context, r io.Reader, out chan Slowl
168168
timeoutTimer.Stop()
169169
return err
170170
case <-timeoutTimer.C:
171-
out <- entry
171+
if state == stateParseStacktrace {
172+
out <- entry
173+
}
174+
172175
entry = slp.createEntry()
173176
state = stateParseHeader
174177
case lineBuf := <-lineCh:

0 commit comments

Comments
 (0)