summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-09-17 20:38:01 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-09-17 20:38:01 +0000
commitbc910fa39c42078d74ca96a7a538ea51aae07cb3 (patch)
tree357ff3184e14434f1ad97aba10fa91c2e6479297 /libs/binder/RpcState.cpp
parent73be4f7716178fc1fc0188d8982801d52d6e8981 (diff)
parentddf8d7998626c14fae353b9e918932a94c0cb849 (diff)
Merge changes I4894c2dd,Id2977f05 am: 22a54f6a5f am: 1cfbd1bce8 am: 8b56fe841b am: ddf8d79986
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1788928 Change-Id: Ieabcd06efc50458c3794e001916739c3d3013e47
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 11a083ac11..dcba837a85 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -323,6 +323,7 @@ status_t RpcState::rpcRec(const sp<RpcSession::RpcConnection>& connection,
status != OK) {
LOG_RPC_DETAIL("Failed to read %s (%zu bytes) on RpcTransport %p, error: %s", what, size,
connection->rpcTransport.get(), statusToString(status).c_str());
+ (void)session->shutdownAndWait(false);
return status;
}
@@ -531,8 +532,8 @@ status_t RpcState::waitForReply(const sp<RpcSession::RpcConnection>& connection,
const sp<RpcSession>& session, Parcel* reply) {
RpcWireHeader command;
while (true) {
- if (status_t status =
- rpcRec(connection, session, "command header", &command, sizeof(command));
+ if (status_t status = rpcRec(connection, session, "command header (for reply)", &command,
+ sizeof(command));
status != OK)
return status;
@@ -601,7 +602,8 @@ status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& con
LOG_RPC_DETAIL("getAndExecuteCommand on RpcTransport %p", connection->rpcTransport.get());
RpcWireHeader command;
- if (status_t status = rpcRec(connection, session, "command header", &command, sizeof(command));
+ if (status_t status = rpcRec(connection, session, "command header (for server)", &command,
+ sizeof(command));
status != OK)
return status;