From 412a3ec710df6bb59a1e209991152d247a2b7827 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Mon, 19 Nov 2018 09:02:41 -0600 Subject: [PATCH] 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 --- src/ripple/app/main/Main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ripple/app/main/Main.cpp b/src/ripple/app/main/Main.cpp index 2e91535ff..f2fffbd4f 100644 --- a/src/ripple/app/main/Main.cpp +++ b/src/ripple/app/main/Main.cpp @@ -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()); + res.first = res.first.at_port( + vm["rpc_port"].as()); if (res.first.port() == 0) throw std::domain_error("0"); }