From 51aa48d622d790899164b0cbc9475d9815d4e2c4 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 8 Mar 2013 13:37:54 -0800 Subject: [PATCH] Lok TOO_BUSY errors. --- src/cpp/ripple/RPCHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 76d135017..03106fcc7 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1163,6 +1163,7 @@ Json::Value RPCHandler::doRipplePathFind(Json::Value jvRequest, int& cost) if (theApp->getJobQueue().getJobCountGE(jtCLIENT) > 200) { + cLog(lsDEBUG) << "Too busy for RPF"; jvResult = rpcError(rpcTOO_BUSY); } else if (!jvRequest.isMember("source_account")) @@ -2892,7 +2893,10 @@ Json::Value RPCHandler::doCommand(const Json::Value& jvRequest, int iRole, int & if (cost == 0) cost = rpcCOST_DEFAULT; if ((iRole != ADMIN) && (theApp->getJobQueue().getJobCountGE(jtCLIENT) > 500)) + { + cLog(lsDEBUG) << "Too busy for command"; return rpcError(rpcTOO_BUSY); + } if (!jvRequest.isMember("command")) return rpcError(rpcCOMMAND_MISSING);