소스 검색

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