duccong / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Possible race condition between content being successfully inserted and confirm notififications being sent #70

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Reviewing the code, I observe:

- BillingService's purchaseStateChanged() method is called.
    - purchaseStateChanged() calls the Response Handler's purchaseResponse() method, which kicks-off a new thread to insert the new data into the database (PurchaseDatabase.updatePurchase()).
    - purchaseStateChanged() ALSO kicks off a ConfirmationNotification thread to inform Play that the update was successful. This is, as far as I can see, done which waiting for the outcome of the thread doing the database update. Thus, if that failed, then Play *thinks* that the data has been received.

Original issue reported on code.google.com by jame...@gmail.com on 18 Jun 2012 at 9:49