diff options
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 6d89064a5d..4ef9cd859d 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -661,13 +661,10 @@ status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& con status_t RpcState::drainCommands(const sp<RpcSession::RpcConnection>& connection, const sp<RpcSession>& session, CommandType type) { - uint8_t buf; while (true) { - size_t num_bytes; - status_t status = connection->rpcTransport->peek(&buf, sizeof(buf), &num_bytes); + status_t status = connection->rpcTransport->pollRead(); if (status == WOULD_BLOCK) break; if (status != OK) return status; - if (!num_bytes) break; status = getAndExecuteCommand(connection, session, type); if (status != OK) return status; |