mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 12:05:53 +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");
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user