Clear the error faster

This commit is contained in:
Vinnie Falco committed 2017-07-20 08:15:27 -07:00
1 parent fc09a4cad1
commit 4d393f4c2a
28 files changed
+117 -116

No files matched your search

@@ -378,7 +378,7 @@ inflate(
if( ec == zlib::error::need_buffers ||
ec == zlib::error::end_of_stream)
{
ec = {};
ec.assign(0, ec.category());
break;
}
if(ec)
@@ -420,7 +420,7 @@ deflate(
return false;
BOOST_ASSERT(zs.avail_out == 0);
BOOST_ASSERT(zs.total_out == buffer_size(out));
ec = {};
ec.assign(0, ec.category());
break;
}
if(zs.avail_out == 0)
@@ -444,7 +444,7 @@ deflate(
zo.write(zs, zlib::Flush::block, ec);
BOOST_ASSERT(! ec || ec == zlib::error::need_buffers);
if(ec == zlib::error::need_buffers)
ec = {};
ec.assign(0, ec.category());
if(ec)
return false;
if(zs.avail_out >= 6)
@@ -459,7 +459,7 @@ deflate(
}
}
}
ec = {};
ec.assign(0, ec.category());
out = buffer(
buffer_cast<void*>(out), zs.total_out);
return true;
+3 -3
View File
@@ -178,7 +178,7 @@ operator()(error_code ec,
{
// Rationale:
// http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
ec = {};
ec.assign(0, ec.category());
}
if(! ec)
{
@@ -960,7 +960,7 @@ do_close:
{
// Rationale:
// http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
ec = {};
ec.assign(0, ec.category());
}
failed_ = ec != 0;
if(failed_)
@@ -975,7 +975,7 @@ do_close:
if(ec == boost::asio::error::eof)
{
// (See above)
ec = {};
ec.assign(0, ec.category());
}
}
if(! ec)
+1 -1
View File
@@ -302,7 +302,7 @@ do_response(http::header<false> const& res,
ec = error::handshake_failed;
return;
}
ec = {};
ec.assign(0, ec.category());
detail::pmd_offer offer;
pmd_read(offer, res);
// VFALCO see if offer satisfies pmd_config_,