pass boost::asio::error::eof if stream get closed

This commit is contained in:
orignal
2026-07-28 18:40:03 -04:00
parent 8affeb074f
commit 4d072c1d57
+3 -1
View File
@@ -422,7 +422,9 @@ namespace stream
else if (ecode == boost::asio::error::operation_aborted)
{
// timeout not expired
if (m_Status == eStreamStatusReset)
if (m_Status == eStreamStatusClosed)
handler (boost::asio::error::make_error_code (boost::asio::error::eof), 0);
else if (m_Status == eStreamStatusReset)
handler (boost::asio::error::make_error_code (boost::asio::error::connection_reset), 0);
else
handler (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), 0);