Use isProtocolIdentified method instead

This commit is contained in:
M. Mert Yildiran
2022-05-03 16:30:11 +03:00
parent 05495eebde
commit 2982d0f3cd

View File

@@ -55,7 +55,7 @@ func (reader *tcpReader) run(options *api.TrafficFilteringOptions, wg *sync.Wait
reader.counterPair = reader.parent.counterPairs[i]
b := bufio.NewReader(reader)
err := extension.Dissector.Dissect(b, reader, options)
if err == nil || reader.parent.protocol != nil {
if err == nil || reader.isProtocolIdentified() {
break
}
reader.exhaustBuffer = true