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

Destruction of socket doesn't cancel async operations #77

Closed
oliora opened this issue May 14, 2015 · 2 comments
Closed

Destruction of socket doesn't cancel async operations #77

oliora opened this issue May 14, 2015 · 2 comments

Comments

@oliora
Copy link

oliora commented May 14, 2015

ASIO objects like sockets and timers follow the approach that an object destructor cancels all the active async operations with boost::asio::error::operation_aborted error. AZMQ socket doesn't do this, so operation handlers are never called if socket destroyed. I propose to change AZMQ to follow ASIO approach.

@rodgert
Copy link

rodgert commented May 14, 2015

I noticed this when I started refactoring the socket_service and fixed the
behavior in the refactored version. I shelved that to finish the standalone
Asio changes, and due to work constraints I haven't had time to get back to
either set of changes. If it is something pressing, I am happy to take a
fix to the existing code. If we can live with it for a month or so, the
refactored code would include the fix when it is ready.

On Thu, May 14, 2015 at 6:27 AM, Andrey Upadyshev notifications@github.com
wrote:

ASIO objects like sockets and timers follow the approach that object
destructor cancels all the active async operations with
boost::asio::error::operation_aborted error. AZMQ socket doesn't do this,
so operation handlers are never called if socket destroyed. I propose to
change AZMQ to follow ASIO approach.


Reply to this email directly or view it on GitHub
#77.

@oliora
Copy link
Author

oliora commented May 14, 2015

No, it's not pressing. Now we explicitly call cancel() before dtor and everything goes well.

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

2 participants