forked from quic-go/quic-go
wire: correctly parse multi-byte frame types (#3736)
This commit is contained in:
@@ -16,13 +16,8 @@ type ConnectionCloseFrame struct {
|
||||
ReasonPhrase string
|
||||
}
|
||||
|
||||
func parseConnectionCloseFrame(r *bytes.Reader, _ protocol.VersionNumber) (*ConnectionCloseFrame, error) {
|
||||
typeByte, err := r.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
f := &ConnectionCloseFrame{IsApplicationError: typeByte == 0x1d}
|
||||
func parseConnectionCloseFrame(r *bytes.Reader, typ uint64, _ protocol.VersionNumber) (*ConnectionCloseFrame, error) {
|
||||
f := &ConnectionCloseFrame{IsApplicationError: typ == 0x1d}
|
||||
ec, err := quicvarint.Read(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user