Added assert on duplicate id in ROUTER and STREAM sockets. Updated man to reflect this change. Modified test case to match.

This commit is contained in:
Tim M
2014-01-21 11:43:34 -08:00
parent 141e1b5966
commit 515af9b147
4 changed files with 11 additions and 18 deletions

View File

@@ -268,10 +268,10 @@ void zmq::stream_t::identify_peer (pipe_t *pipe_)
connect_rid.clear ();
outpipes_t::iterator it = outpipes.find (identity);
if (it != outpipes.end ())
goto d;
zmq_assert(false);
}
else {
d: put_uint32 (buffer + 1, next_rid++);
put_uint32 (buffer + 1, next_rid++);
identity = blob_t (buffer, sizeof buffer);
memcpy (options.identity, identity.data (), identity.size ());
options.identity_size = identity.size ();