mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 21:45:52 +00:00
Avoid a crash scenario if we interrogate the remote endpoint after it disconnected.
This commit is contained in:
@@ -146,7 +146,14 @@ std::string RPCServer::handleRequest(const std::string& requestStr)
|
|||||||
return HTTPReply(400, "params unparseable");
|
return HTTPReply(400, "params unparseable");
|
||||||
}
|
}
|
||||||
|
|
||||||
mRole = iAdminGet(jvRequest, mSocket.remote_endpoint().address().to_string());
|
try
|
||||||
|
{
|
||||||
|
mRole = iAdminGet(jvRequest, mSocket.remote_endpoint().address().to_string());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{ // endpoint already disconnected
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if (RPCHandler::FORBID == mRole)
|
if (RPCHandler::FORBID == mRole)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user