Fix sniffer errors override each others

* Fix sniffer errors override each others

* Do not return ErrNeedMoreData if header is not expected
This commit is contained in:
dyhkwong
2025-04-22 14:44:55 +08:00
committed by GitHub
parent c54d50fd36
commit f2bbf6b2aa
7 changed files with 102 additions and 10 deletions

View File

@@ -68,7 +68,7 @@ func PeekStream(ctx context.Context, metadata *adapter.InboundContext, conn net.
}
sniffError = E.Errors(sniffError, err)
}
if !errors.Is(err, ErrNeedMoreData) {
if !errors.Is(sniffError, ErrNeedMoreData) {
break
}
}