Closed ruz closed 5 years ago
Thanks. Will look at it this week.
Same problem here with msgpack handler! Calling Encode only work the first time and return an "index out of range" error afterward. It used to work fine before. Fixed it in my code by calling encoder.Reset() each time I call encoder.Encode but not sure it's normal.
package main
import (
"bytes"
"fmt"
"github.com/ugorji/go/codec"
)
func main() {
var w bytes.Buffer
encoder := codec.NewEncoder(&w, new(codec.MsgpackHandle))
err := encoder.Encode(uint32(123456))
err = encoder.Encode(uint32(123456))
fmt.Printf("error: %+v\n", err)
}
This is used to work with older commits.