forked from quic-go/quic-go
put back the packet buffer when parsing the connection ID fails
This commit is contained in:
@@ -273,6 +273,7 @@ func (h *packetHandlerMap) handlePacket(
|
||||
) {
|
||||
connID, err := wire.ParseConnectionID(data, h.connIDLen)
|
||||
if err != nil {
|
||||
buffer.MaybeRelease()
|
||||
h.logger.Debugf("error parsing connection ID on packet from %s: %s", addr, err)
|
||||
if h.tracer != nil {
|
||||
h.tracer.DroppedPacket(addr, logging.PacketTypeNotDetermined, protocol.ByteCount(len(data)), logging.PacketDropHeaderParseError)
|
||||
|
||||
Reference in New Issue
Block a user