Discussion:
Cancelling composed async connect
(too old to reply)
Andrey Goryachev
2016-03-15 11:40:27 UTC
Permalink
Hi all,

I'm reading the source code of the composed async_connect and got
impression that it may ignore calls of cancel() on the socket. The
code I'm reading is here:
https://github.com/chriskohlhoff/asio/blob/master/asio/include/asio/impl/connect.hpp

I see the following possible situation:
1) An intermediate async_connect operation completes without being cancelled.
2) range_connect_op::operator() is scheduled to the queue to be called.
3) User calls cancel() on the socket.
4) range_connect_op::operator() is executed. It doesn't know that
cancel() was called and just continues connecting to the other
endpoints.

Is it really the case or I'm missing something?

Best,
Andrey

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio

Loading...