diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index b7d40e8a..ece160f5 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -742,14 +742,6 @@ void zmq::stream_engine_t::mechanism_ready () properties_t properties; properties_t::const_iterator it; - // Add ZMTP properties. - const properties_t& zmtp_properties = mechanism->get_zmtp_properties (); - it = zmtp_properties.begin (); - while (it != zmtp_properties.end ()) { - properties.insert (properties_t::value_type (it->first, it->second)); - it++; - } - // Add ZAP properties. const properties_t& zap_properties = mechanism->get_zap_properties (); it = zap_properties.begin (); @@ -758,6 +750,14 @@ void zmq::stream_engine_t::mechanism_ready () it++; } + // Add ZMTP properties. + const properties_t& zmtp_properties = mechanism->get_zmtp_properties (); + it = zmtp_properties.begin (); + while (it != zmtp_properties.end ()) { + properties.insert (properties_t::value_type (it->first, it->second)); + it++; + } + zmq_assert (metadata == NULL); if (!properties.empty ()) metadata = new (std::nothrow) metadata_t (properties);