Commit 2b69c86d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a8f583cc
......@@ -237,7 +237,14 @@ func pktDecodeZ(pkb *pktBuf) (msg, error) {
flags, ok := pickletools.Xint64(tpkt[1])
if !ok {
return m, derrf("flags: got %T; expected int", tpkt[1])
bflags, ok := tpkt[1].(bool)
if !ok {
return m, derrf("flags: got %T; expected int|bool", tpkt[1])
}
if bflags {
flags = 1
} // else: flags is already = 0
}
// XXX check flags are in range?
m.flags = msgFlags(flags)
......@@ -570,6 +577,7 @@ func handshake(ctx context.Context, conn net.Conn) (_ *zLink, err error) {
}
zl.ver = ver
zl.encoding = 'Z' // XXX hardcoded
close(hok)
return nil
})
......
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