fix StreamID len in StreamFrame TypeByte if len was calculated by MinLength

fixes #166
This commit is contained in:
Marten Seemann
2016-06-07 13:47:38 +07:00
parent 4f49a242ff
commit 995c020b39
2 changed files with 14 additions and 1 deletions

View File

@@ -106,8 +106,8 @@ func (f *StreamFrame) Write(b *bytes.Buffer, version protocol.VersionNumber) err
if f.streamIDLen == 0 {
f.calculateStreamIDLength()
typeByte ^= uint8(f.streamIDLen) - 1
}
typeByte ^= uint8(f.streamIDLen) - 1
b.WriteByte(typeByte)