fix determining of packet type from packet header in qlog

This commit is contained in:
Marten Seemann
2020-03-21 12:49:46 +07:00
parent 2f2583beb0
commit 1a539334b8
2 changed files with 9 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/lucas-clemente/quic-go/internal/wire"
)
// PacketTypeFromHeader determines the packet type from a *wire.Header.
func PacketTypeFromHeader(hdr *wire.Header) PacketType {
if !hdr.IsLongHeader {
return PacketType1RTT
@@ -24,7 +25,7 @@ func PacketTypeFromHeader(hdr *wire.Header) PacketType {
case protocol.PacketTypeRetry:
return PacketTypeRetry
default:
panic("unknown packet type")
return PacketTypeNotDetermined
}
}