Skip to content

Router does not reject duplicate identity #4503

@BenediktBurger

Description

@BenediktBurger

Issue description

If I set the same identity to two sockets (DEALER) and connect them to one ROUTER socket, the first connected DEALER works fine, while the other one does connect, but no message arrives at the ROUTER socket.
According to the manual, the second connection should be refused:

"If two clients use the same routing id when connecting to a ROUTER, the results shall depend on the ZMQ_ROUTER_HANDOVER option setting. If that is not set (or set to the default of zero), the ROUTER socket shall reject clients trying to connect with an already-used routing id."

However no error message is raised.

See also #2010

Environment

  • libzmq version (commit hash if unreleased): 4.3.4
  • OS:

Minimal test code / Steps to reproduce the issue

You can use zeromq/pyzmq#1646

  1. start a server (parameters: "s")
  2. start a client (parameters: "c T1")
  3. start a second client (parameters: "c T2")
  4. send a message via second client and it hangs

What's the actual result? (include assertion message & call stack if applicable)

Message of second client does not arrive.

What's the expected result?

An error message, that the second client cannot connect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions