Merge "libbinder: clear RpcSession::mStartedSetup in case of error" am: 8878fb5e5e am: f00a433c47

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

Change-Id: I42dd15a73895c45a7a5c5d386b459368b7ce0cd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index d347262..8ddfa93 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -484,6 +484,9 @@
         mProtocolVersion = oldProtocolVersion;
 
         mConnections = {};
+
+        // clear mStartedSetup so that we can reuse this RpcSession
+        mStartedSetup = false;
     });
 
     if (status_t status = connectAndInit({}, false /*incoming*/); status != OK) return status;