Updated man entries, and added behavior in case the user duplicates peer ids. In this case the socket reverts to default behavior.

This commit is contained in:
Tim M
2014-01-19 17:28:13 -08:00
parent 1d9b76c860
commit 3fbc10eba7
3 changed files with 34 additions and 3 deletions

View File

@@ -387,13 +387,15 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
msg_t msg;
blob_t identity;
bool ok;
bool connect_rid_used = false;
if (connect_rid.length()) {
identity = blob_t ((unsigned char*) connect_rid.c_str (),
connect_rid.length());
connect_rid.clear ();
connect_rid_used = true;
outpipes_t::iterator it = outpipes.find (identity);
if (it != outpipes.end ()) {
return false; // duplicate connection
}
}
else
if (options.raw_sock) { // Always assign identity for raw-socket