Boost C++ Libraries: Ticket #3861: Closing a socket doesn't cancel all pending asynchronous send operations https://svn.boost.org/trac10/ticket/3861 <p> Using the attached sample program (a slightly modified version of the daytime3 tutorial). When I connect with a telnet session to the server and close the connection directly I get the following output from the server: Transfer status: Success. Transfer status: Broken pipe. Transfer status: Broken pipe. Transfer status: Broken pipe. </p> <p> After the first error I close the socket and would expect a boost::asio::error::operation_aborted error instead of the broken pipe. </p> <p> Reproduced under both Debian Lenny (gcc 4.3.4) and Windows XP (MSVC 2008). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3861 Trac 1.4.3 m.de.wever@… Tue, 26 Jan 2010 11:06:04 GMT attachment set https://svn.boost.org/trac10/ticket/3861 https://svn.boost.org/trac10/ticket/3861 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">server.cpp</span> </li> </ul> <p> Sample program to reproduce the bug </p> Ticket chris_kohlhoff Thu, 18 Mar 2010 03:15:44 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3861#comment:1 https://svn.boost.org/trac10/ticket/3861#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> The behaviour is correct. The write operations are not pending when you call close, it's just that the handlers haven't been called yet. The write operations themselves completed with an error as soon as the client closed the connection. </p> Ticket