mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Only touch remote_endpoint under a try/catch block.
This commit is contained in:
@@ -49,8 +49,16 @@ void RPCDoor::handleConnect(RPCServer::pointer new_connection,
|
||||
if (!error)
|
||||
{
|
||||
// Restrict callers by IP
|
||||
if (!isClientAllowed(new_connection->getSocket().remote_endpoint().address().to_string()))
|
||||
try
|
||||
{
|
||||
if (!isClientAllowed(new_connection->getSocket().remote_endpoint().address().to_string()))
|
||||
{
|
||||
startListening();
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{ // client may have disconnected
|
||||
startListening();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user