Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: zmq_poller does not fail with ETERM when context shutdown #3492

Closed
jean-airoldie opened this issue May 6, 2019 · 2 comments
Closed

Comments

@jean-airoldie
Copy link
Contributor

jean-airoldie commented May 6, 2019

Issue description

zmq_poller does not return ETERM when a registed socket's context is shutdown if no flags is specified. Note that this is only an issue when no flag is specified.

Environment

Minimal test code / Steps to reproduce the issue

  1. Create a zmq_poller.
  2. Create and register a socket in the poller with no flags specified (0).
  3. Call zmq_ctx_shutdown on the context of the registered socket.
  4. Call zmq_poller_wait with no timeout (-1) on the poller.

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

The call to zmq_poller_wait blocks forever.

What's the expected result?

Since the context of one of the registered socket was terminated, the call to zmq_poller_wait should fail with ETERM, as specified in the docs.

@sigiesec
Copy link
Member

sigiesec commented May 8, 2019

If you have a poller that only has one or more sockets without any flags registered, it can never return succesfully. Calling zmq_poller_wait with an infinite timeout in this case should probably fail with EINVAL immediately, independently from the shutdown of the context.

@stale
Copy link

stale bot commented May 7, 2020

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.

@stale stale bot added the stale label May 7, 2020
@stale stale bot closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants