Commit 854d865f authored by Levin Zimmermann's avatar Levin Zimmermann

fixup! X on msgpack support

This fixes a stucked client: now the handshake packet is correctly
proceeded.
parent f485609c
......@@ -276,17 +276,13 @@ func rxHello(errctx string, rx *xbufReader) (enc proto.Encoding, version uint32,
if err != nil {
return 0, 0, err
}
if !bytes.Equal(b[4:], []byte{'O', 0}) {
if !bytes.Equal(b[4:5], []byte{'O'}) {
badMagic = true
break
}
peerEnc = 'M'
rxM := msgp.Reader{R: rx.Reader}
peerVer, err = rxM.ReadUint32()
if err != nil {
return 0, 0, fmt.Errorf("M: recv peer version: %s", err) // XXX + "read magic" ctx
}
peerVer = uint32(b[5])
default:
badMagic = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment