Pull money manipulation out of the thread for thread safety
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Controllers.Payment {
|
||||
}
|
||||
|
||||
// Remove the money and save
|
||||
_DBdriver.Set( dbPrefix + "money", (result - Price).ToString());
|
||||
// _DBdriver.Set( dbPrefix + "money", (result - Price).ToString()); -> Dont save in here as its done externally for thread safty
|
||||
found.PaymentSuccess = true;
|
||||
found.Processed = true;
|
||||
return (true, "");
|
||||
@@ -89,7 +89,7 @@ namespace Controllers.Payment {
|
||||
}
|
||||
|
||||
// Add the money and save
|
||||
_DBdriver.Set( dbPrefix + "money", (result + Price).ToString());
|
||||
// _DBdriver.Set( dbPrefix + "money", (result + Price).ToString()); -> Dont save in here as its done externally for thread safty
|
||||
found.PaymentSuccess = true;
|
||||
found.Processed = true;
|
||||
return (true, "");
|
||||
|
||||
Reference in New Issue
Block a user