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

@@ -393,9 +393,8 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
connect_rid.length());
connect_rid.clear ();
outpipes_t::iterator it = outpipes.find (identity);
if (it != outpipes.end ()) {
return false; // duplicate connection
}
if (it != outpipes.end ())
zmq_assert(false); // Not allowed to duplicate an existing rid
}
else
if (options.raw_sock) { // Always assign identity for raw-socket