forked from boostorg/beast
Squelch harmless not_connected errors
This commit is contained in:
@@ -560,7 +560,11 @@ private:
|
||||
{
|
||||
error_code ec;
|
||||
stream().shutdown(socket_type::shutdown_both, ec);
|
||||
if(ec)
|
||||
|
||||
// not_connected happens under normal
|
||||
// circumstances so don't bother reporting it.
|
||||
//
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
return this->fail("shutdown", ec);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -198,7 +198,7 @@ private:
|
||||
{
|
||||
// Give the derived class a chance to do stuff
|
||||
impl().do_shutdown(ec);
|
||||
if(ec)
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
return fail("shutdown", ec);
|
||||
return;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ private:
|
||||
{
|
||||
// Give the derived class a chance to do stuff
|
||||
impl().do_shutdown(ec);
|
||||
if(ec)
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
return fail("shutdown", ec);
|
||||
return;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ private:
|
||||
{
|
||||
// Give the derived class a chance to do stuff
|
||||
impl().do_shutdown(ec);
|
||||
if(ec)
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
return fail("shutdown", ec);
|
||||
return;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ private:
|
||||
if(ec == beast::http::error::end_of_stream)
|
||||
{
|
||||
// Give the derived class a chance to do stuff
|
||||
impl().do_shutdown(ec);
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
if(ec)
|
||||
return fail("shutdown", ec);
|
||||
return;
|
||||
|
||||
@@ -93,7 +93,7 @@ private:
|
||||
//
|
||||
stream().shutdown(ec);
|
||||
if(ec)
|
||||
return this->fail("shutdown", ec);
|
||||
return this->fail("ssl_shutdown", ec);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -177,9 +177,10 @@ private:
|
||||
socket_type::shutdown_both,
|
||||
ec);
|
||||
|
||||
// Report failure if any
|
||||
// not_connected happens under normal
|
||||
// circumstances so don't bother reporting it.
|
||||
//
|
||||
if(ec)
|
||||
if(ec && ec != beast::errc::not_connected)
|
||||
return this->fail("shutdown", ec);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user