Skip to content

Commit 006c09f

Browse files
authored
Merge pull request microsoft#260 from johnpaultaken/dev3
ECONNRESET must be used instead of ECONNABORTED.
2 parents 27529ba + 1ee9d64 commit 006c09f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Release/src/http/listener/http_server_asio.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,12 @@ void connection::handle_http_line(const boost::system::error_code& ec)
249249
if (ec)
250250
{
251251
// client closed connection
252-
if (ec == boost::asio::error::eof || ec == boost::asio::error::operation_aborted)
252+
if (
253+
ec == boost::asio::error::eof || // peer has performed an orderly shutdown
254+
ec == boost::asio::error::operation_aborted || // this can be removed. ECONNABORTED happens only for accept()
255+
ec == boost::asio::error::connection_reset || // connection reset by peer
256+
ec == boost::asio::error::timed_out // connection timed out
257+
)
253258
{
254259
finish_request_response();
255260
}

0 commit comments

Comments
 (0)