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

Commit 4a0fad36 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "~RpcServer() calls shutdown explicitly." am: de10257e

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1712596

Change-Id: I3efaf6a14812e538b52a2cca719d4795f2439364
parents 92ce7212 de10257e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -39,7 +39,9 @@ using base::ScopeGuard;
using base::unique_fd;

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

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

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