fix: we need to use the msgpack reader and get the rest of the bytes, not use DecodeRaw

This commit is contained in:
Derrick Hammer 2024-01-07 22:21:59 -05:00
parent 12d8d1371a
commit fec2adb72f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"git.lumeweb.com/LumeWeb/libs5-go/net" "git.lumeweb.com/LumeWeb/libs5-go/net"
"git.lumeweb.com/LumeWeb/libs5-go/types" "git.lumeweb.com/LumeWeb/libs5-go/types"
"github.com/vmihailenco/msgpack/v5" "github.com/vmihailenco/msgpack/v5"
"io"
"net/url" "net/url"
) )
@ -119,7 +120,8 @@ func (i *IncomingMessageImpl) DecodeMsgpack(dec *msgpack.Decoder) error {
i.kind = types.ProtocolMethod(kind) i.kind = types.ProtocolMethod(kind)
raw, err := dec.DecodeRaw() raw, err := io.ReadAll(dec.Buffered())
if err != nil { if err != nil {
return err return err
} }