forked from boostorg/beast
Clear error codes idiomatically
This commit is contained in:
1 parent
9ea70bfbe5
commit
944b5dcda7
29 files changed
+118
-112
No files matched your search
@@ -191,7 +191,7 @@ public:
|
||||
{
|
||||
// Rationale:
|
||||
// http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
|
||||
ec.assign(0, ec.category());
|
||||
ec = {};
|
||||
}
|
||||
if(ec)
|
||||
return fail(ec, "shutdown");
|
||||
|
||||
@@ -113,7 +113,7 @@ do_session(
|
||||
{
|
||||
// Rationale:
|
||||
// http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
|
||||
ec.assign(0, ec.category());
|
||||
ec = {};
|
||||
}
|
||||
if(ec)
|
||||
return fail(ec, "shutdown");
|
||||
|
||||
@@ -111,7 +111,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
// Rationale:
|
||||
// http://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
|
||||
ec.assign(0, ec.category());
|
||||
ec = {};
|
||||
}
|
||||
if(ec)
|
||||
throw beast::system_error{ec};
|
||||
|
||||
Reference in new issue
Block a user