Boost C++ Libraries: Ticket #10906: async_connect can't be stopped on boost 1.57, win 7 64bit https://svn.boost.org/trac10/ticket/10906 <p> I currently use Windows 7 64bit, MSVC2010 and Boost.Asio 1.57. I would like to connect to a TCP server with a timeout. If the timeout expires, I should close the connection as soon as possible as the IP address (chosen by a user) is probably wrong. </p> <p> With my computer, closing the socket takes about 15 seconds to complete, which makes my program not responsive for a while. On Linux the same code seems to be fine. I attach a code that reproduce the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10906 Trac 1.4.3 gwenael.dunand@… Mon, 29 Dec 2014 16:07:15 GMT attachment set https://svn.boost.org/trac10/ticket/10906 https://svn.boost.org/trac10/ticket/10906 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> <p> code that reproduces the problem. </p> Ticket gwenael.dunand@… Tue, 30 Dec 2014 09:49:05 GMT <link>https://svn.boost.org/trac10/ticket/10906#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10906#comment:1</guid> <description> <p> My example is clearly working on Boost 1.55 and is failing on Boost 1.57. On Boost 1.55 socket.close() cancel all asynchronous call immediately, which is not the case on the 1.57 version. Best regards, Poukill </p> </description> <category>Ticket</category> </item> <item> <author>juan.laube@…</author> <pubDate>Wed, 23 Sep 2015 19:21:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10906#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10906#comment:2</guid> <description> <p> I'm experiencing a similar problem. An executable compiled with boost 1.58 works fine in Windows 10 but has this flaw in Windows 7 </p> </description> <category>Ticket</category> </item> <item> <author>pwiecz@…</author> <pubDate>Mon, 05 Jun 2017 09:28:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10906#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10906#comment:3</guid> <description> <p> I have the same problem under Windows 10 Pro, 10.0.15063 compilation 15063 and Boost 1.62. The async_connect handler is not getting called, regardless if I call .close() or .cancel() on the socket. </p> </description> <category>Ticket</category> </item> <item> <author>pwiecz@…</author> <pubDate>Mon, 05 Jun 2017 11:53:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10906#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10906#comment:4</guid> <description> <p> Please disregard my last comment. I've found a problem in my code. Sorry for the confusion. </p> </description> <category>Ticket</category> </item> </channel> </rss>