Sfoglia il codice sorgente

make sure we only compare the version not the direction

Chris Bannister 10 anni fa
parent
commit
0acec9af19
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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