diff --git a/internal/remote/codec.go b/internal/remote/codec.go index 6b3d3d60..b3948dc7 100644 --- a/internal/remote/codec.go +++ b/internal/remote/codec.go @@ -188,7 +188,7 @@ func encode(command *RemotingCommand) ([]byte, error) { } frameSize := 4 + len(header) + len(command.Body) - buf := bytes.NewBuffer(make([]byte, frameSize)) + buf := bytes.NewBuffer(make([]byte, frameSize+4)) buf.Reset() err = binary.Write(buf, binary.BigEndian, int32(frameSize))