|
|
@ -285,7 +285,7 @@ namespace stream |
|
|
|
auto s = shared_from_this(); |
|
|
|
auto s = shared_from_this(); |
|
|
|
m_Service.post ([=](void) |
|
|
|
m_Service.post ([=](void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!m_ReceiveQueue.empty () || m_Status == eStreamStatusReset) |
|
|
|
if (!m_ReceiveQueue.empty () || m_Status == eStreamStatusReset || m_Status == eStreamStatusClosed) |
|
|
|
s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler, 0); |
|
|
|
s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler, 0); |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -306,7 +306,7 @@ namespace stream |
|
|
|
else if (ecode == boost::asio::error::operation_aborted) |
|
|
|
else if (ecode == boost::asio::error::operation_aborted) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// timeout not expired
|
|
|
|
// timeout not expired
|
|
|
|
if (m_Status == eStreamStatusReset) |
|
|
|
if (m_Status == eStreamStatusReset || m_Status == eStreamStatusClosed) |
|
|
|
handler (boost::asio::error::make_error_code (boost::asio::error::connection_reset), 0); |
|
|
|
handler (boost::asio::error::make_error_code (boost::asio::error::connection_reset), 0); |
|
|
|
else |
|
|
|
else |
|
|
|
handler (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), 0); |
|
|
|
handler (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), 0); |
|
|
|