mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
Tiny adjustment
This commit is contained in:
parent
3072cdccf4
commit
0e8e23897c
@ -19,13 +19,12 @@ func EncodeHeaderAddons(buffer *buf.Buffer, addons *Addons) error {
|
|||||||
|
|
||||||
if bytes, err := proto.Marshal(addons); err != nil {
|
if bytes, err := proto.Marshal(addons); err != nil {
|
||||||
return newError("failed to marshal addons protobuf value").Base(err)
|
return newError("failed to marshal addons protobuf value").Base(err)
|
||||||
} else {
|
}
|
||||||
if err := buffer.WriteByte(byte(len(bytes))); err != nil {
|
if err := buffer.WriteByte(byte(len(bytes))); err != nil {
|
||||||
return newError("failed to write addons protobuf length").Base(err)
|
return newError("failed to write addons protobuf length").Base(err)
|
||||||
}
|
}
|
||||||
if _, err := buffer.Write(bytes); err != nil {
|
if _, err := buffer.Write(bytes); err != nil {
|
||||||
return newError("failed to write addons protobuf value").Base(err)
|
return newError("failed to write addons protobuf value").Base(err)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user