We're updating the issue view to help you get more done. 

A SUB socket with a message in queue should always have ZMQ_POLLIN set

Description

When checking for events on a SUB socket with zmq_getsockopt(sock, ZMQ_EVENTS, &events, &size), the events variable should be set to ZMQ_POLLIN. In 3.0, it is set to 0.

This only occurs when the SUB socket binds and the PUB connects. If you swap the bind/connect on the sockets, it works.

This same code works in 2.1.x regardless of the order of bind/connect.

(issue has been committed to the issues repository.)

Environment

OSX, Linux

Status

Assignee

Martin Sustrik

Reporter

Chuck Remes

Labels

Components

Affects versions

3.0.0

Priority

Major