From 4620b667e729335778e13ec54cb97f50be7a73e5 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 7 Nov 2013 22:30:11 -0800 Subject: [PATCH] Fix a race condition if PathRequest::doCreate races with the path being processed. --- src/ripple_app/paths/PathRequest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ripple_app/paths/PathRequest.cpp b/src/ripple_app/paths/PathRequest.cpp index 1c216f6c9..f0456826e 100644 --- a/src/ripple_app/paths/PathRequest.cpp +++ b/src/ripple_app/paths/PathRequest.cpp @@ -124,6 +124,8 @@ Json::Value PathRequest::doCreate (Ledger::ref lrLedger, const Json::Value& valu } else mValid = false; + + status = jvStatus; } if (mValid) @@ -136,7 +138,7 @@ Json::Value PathRequest::doCreate (Ledger::ref lrLedger, const Json::Value& valu sRequests.insert (shared_from_this ()); } - return jvStatus; + return status; } int PathRequest::parseJson (const Json::Value& jvParams, bool complete)