fix: use ReadAll on msgpack.Buffered

This commit is contained in:
Derrick Hammer 2024-01-07 22:57:03 -05:00
parent 2f5a853ff8
commit ed48f60b12
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"git.lumeweb.com/LumeWeb/libs5-go/protocol/base" "git.lumeweb.com/LumeWeb/libs5-go/protocol/base"
"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"
) )
var ( var (
@ -57,7 +58,8 @@ func (s *signedMessagePayoad) DecodeMsgpack(dec *msgpack.Decoder) error {
s.kind = kind s.kind = kind
message, err := dec.DecodeRaw() message, err := io.ReadAll(dec.Buffered())
if err != nil { if err != nil {
return err return err
} }