Commit e95b477a authored by Martin Hurton's avatar Martin Hurton

Don't add empty metadata to received messages

parent f721a7ad
......@@ -142,7 +142,8 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_,
}
if (zap_flag) {
assert (metadata == NULL);
metadata = new (std::nothrow) metadata_t (dict);
if (!dict.empty ())
metadata = new (std::nothrow) metadata_t (dict);
}
return 0;
}
......
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