Commit 30a06c97 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8b51a7b8
......@@ -89,7 +89,13 @@ func pktEncodeM(m msg) *pktBuf {
// arg
// it is interface{} - use shamaton/msgpack since msgp does not handle
// arbitrary interfaces well.
dataArg, err := msgpack.Encode(m.arg)
// XXX shamaton/msgpack encodes tuple(nil) as nil, not empty tuple
arg := m.arg
tup, ok := arg.(tuple)
if ok && tup == nil {
arg = tuple{}
}
dataArg, err := msgpack.Encode(arg)
if err != nil {
panic(err) // all our types are expected to be supported by msgpack
}
......
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