From cce554ec472d9a583845d8b7c77e12c853bfa880 Mon Sep 17 00:00:00 2001 From: Arthur Ishiguro Date: Fri, 8 Dec 2017 09:26:17 -0800 Subject: [PATCH] Handles transactions started immediately after completion Unset mIsTransactionPending before invoking handleTxnResult to allow service to start a new transaction. Bug: 70387233 Test: Run a sample application that concurrently loads and unloads 2 nanoapps, verify both transactions succeed. Change-Id: I465882dd8fd8fdd89b959642f6fdc2e452ce61a6 --- contexthub/1.0/default/Contexthub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contexthub/1.0/default/Contexthub.cpp b/contexthub/1.0/default/Contexthub.cpp index 5d6a0d618e..5f83a22f4c 100644 --- a/contexthub/1.0/default/Contexthub.cpp +++ b/contexthub/1.0/default/Contexthub.cpp @@ -281,11 +281,11 @@ int Contexthub::handleOsMessage(sp cb, result = TransactionResult::FAILURE; } + mIsTransactionPending = false; if (cb != nullptr) { cb->handleTxnResult(mTransactionId, result); } retVal = 0; - mIsTransactionPending = false; break; }