Closed
Description
Reproducer:
func TestNewStream_Many(t *testing.T) {
test_helpers.SkipIfStreamsUnsupported(t)
conn := test_helpers.ConnectWithValidation(t, server, opts)
defer conn.Close()
for i := 0; i < 256; i++ {
stream, _ := conn.NewStream()
req := NewPingRequest()
_, err := stream.Do(req).Get()
if err != nil {
t.Fatalf("Failed to Ping: %s", err.Error())
}
}
}
Result:
Failed to Ping: Invalid MsgPack - packet header (0x14)
Most likely the reason is an incorrect conversion to bytes of a stream id value:
Line 549 in 8b58928
You can compare it with the code above:
Lines 544 to 546 in 8b58928