Commit 55c06924 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #998 from hurtonm/master

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