forked from quic-go/quic-go
improve qlogging of transport errors
This commit is contained in:
@@ -236,8 +236,12 @@ func marshalConnectionCloseFrame(enc *gojay.Encoder, f *wire.ConnectionCloseFram
|
||||
}
|
||||
enc.StringKey("frame_type", "connection_close")
|
||||
enc.StringKey("error_space", errorSpace)
|
||||
enc.Int64Key("error_code", int64(f.ErrorCode))
|
||||
enc.Int64Key("raw_error_code", int64(f.ErrorCode))
|
||||
if errName := transportError(f.ErrorCode).String(); len(errName) > 0 {
|
||||
enc.StringKey("error_code", errName)
|
||||
} else {
|
||||
enc.Uint64Key("error_code", uint64(f.ErrorCode))
|
||||
}
|
||||
enc.Uint64Key("raw_error_code", uint64(f.ErrorCode))
|
||||
enc.StringKey("reason", f.ReasonPhrase)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user