diff options
| author | 2021-09-17 20:47:42 +0000 | |
|---|---|---|
| committer | 2021-09-17 20:47:42 +0000 | |
| commit | 5c78b18047eb5d8e532f6dfa482b2c0bf8eb96cb (patch) | |
| tree | c80c9997ea7de42942dbd9e0842d1e867e90faef /libs/binder/RpcState.cpp | |
| parent | c6e856f104d717214c0adbc76c3e45f64e10b061 (diff) | |
| parent | bc910fa39c42078d74ca96a7a538ea51aae07cb3 (diff) | |
Merge changes I4894c2dd,Id2977f05 am: 22a54f6a5f am: 1cfbd1bce8 am: 8b56fe841b am: ddf8d79986 am: bc910fa39c
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1788928
Change-Id: I8680a7371125355ba758564d0ee3762c67c35100
Diffstat (limited to 'libs/binder/RpcState.cpp')
| -rw-r--r-- | libs/binder/RpcState.cpp | 8 |
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; |