mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix the --rpc_port command-line argument
The --rpc_port command-line option is effectively ignored. We construct an `Endpoint` with the given port, but then drop it on the floor. (Perhaps the author thought the `Endpoint::at_port` method is a mutation instead of a transformation.) This small change adds the missing assignment to hold on to the new endpoint. Fixes #2764
This commit is contained in:
committed by
Nik Bougalis
parent
30bba29da2
commit
412a3ec710
@@ -620,7 +620,8 @@ int run (int argc, char** argv)
|
||||
std::cerr << "WARNING: using deprecated rpc_port param.\n";
|
||||
try
|
||||
{
|
||||
res.first.at_port(vm["rpc_port"].as<std::uint16_t>());
|
||||
res.first = res.first.at_port(
|
||||
vm["rpc_port"].as<std::uint16_t>());
|
||||
if (res.first.port() == 0)
|
||||
throw std::domain_error("0");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user