Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de10257e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "~RpcServer() calls shutdown explicitly."

parents fc907867 436f0e6d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -39,7 +39,9 @@ using base::ScopeGuard;
using base::unique_fd;
using base::unique_fd;


RpcServer::RpcServer() {}
RpcServer::RpcServer() {}
RpcServer::~RpcServer() {}
RpcServer::~RpcServer() {
    (void)shutdown();
}


sp<RpcServer> RpcServer::make() {
sp<RpcServer> RpcServer::make() {
    return sp<RpcServer>::make();
    return sp<RpcServer>::make();
@@ -204,7 +206,6 @@ bool RpcServer::acceptOneNoCheck() {
}
}


bool RpcServer::shutdown() {
bool RpcServer::shutdown() {
    LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!");
    std::unique_lock<std::mutex> _l(mLock);
    std::unique_lock<std::mutex> _l(mLock);
    if (mShutdownTrigger == nullptr) return false;
    if (mShutdownTrigger == nullptr) return false;