瀏覽代碼

make sure we only compare the version not the direction

Chris Bannister 10 年之前
父節點
當前提交
0acec9af19
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      frame.go

+ 2 - 0
frame.go

@@ -253,6 +253,8 @@ func newFramer(r io.Reader, w io.Writer, compressor Compressor, version byte) *f
 		flags |= flagCompress
 	}
 
+	version &= protoVersionMask
+
 	headSize := 8
 	if version > protoVersion2 {
 		headSize = 9