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

Close pipe by ID #7

Closed
gdamore opened this issue Jan 16, 2017 · 3 comments
Closed

Close pipe by ID #7

gdamore opened this issue Jan 16, 2017 · 3 comments

Comments

@gdamore
Copy link
Contributor

gdamore commented Jan 16, 2017

For messages, we could store the PIPE ID as a message property. This could then be used by the application to conditionally close the underlying pipe (if it still exists). Using IDs here would solve questions about use-after-free, and avoid needing to hold any locks or long term reference counts.

@gdamore
Copy link
Contributor Author

gdamore commented Aug 24, 2017

nng_msg_get_pipe() already exists now.
nng_pipe_close() exists too; unfortunately it uses a pointer to nng_pipe, instead of an ID like sockets and endpoints. We need to fix this.

@gdamore
Copy link
Contributor Author

gdamore commented Sep 28, 2017

This is fixed now, but we need a test for it.

@gdamore
Copy link
Contributor Author

gdamore commented Oct 1, 2017

The pipe_close_test branch validates this -- but we can confirm that this is now working at any rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant