Skip to content

Commit eb39585

Browse files
committed
fix: dead loop bug
fix: dead loop bug
1 parent da149ed commit eb39585

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

agent/conn/processor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ func (p *Processor) processOldFirstPacketEvents(recordChannel chan RecordWithCon
339339
if now.Sub(event.timestamp) > 100*time.Millisecond {
340340
p.processFirstPacketEvent(event.event, recordChannel)
341341
p.tempFirstPacketEvents.Read()
342+
} else {
343+
break
342344
}
343345
}
344346
}
@@ -464,7 +466,6 @@ func (p *Processor) processSyscallEvent(event *bpf.SyscallEventData, recordChann
464466
conn := p.connManager.LookupConnection4ByTimestamp(tgidFd, event.SyscallEvent.GetEndTs())
465467

466468
timeCheck := conn != nil && conn.timeBoundCheck(event.SyscallEvent.GetEndTs())
467-
468469
if conn == nil {
469470
if common.BPFEventLog.Level >= logrus.DebugLevel {
470471
common.BPFEventLog.Debugf("[syscall][no conn][ts=%d][tgid=%d fd=%d][len=%d] %s", event.SyscallEvent.Ke.Ts, tgidFd>>32, uint32(tgidFd), event.SyscallEvent.BufSize, string(event.Buf))

0 commit comments

Comments
 (0)