Explorar o código

make sure we only compare the version not the direction

Chris Bannister %!s(int64=10) %!d(string=hai) anos
pai
achega
0acec9af19
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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