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

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