aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r--src/rpcserver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 205cbf2d79..f43acf41ba 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -566,7 +566,6 @@ void StartRPCThreads()
try
{
boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
- rpc_acceptors.push_back(acceptor);
acceptor->open(endpoint.protocol());
acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
@@ -578,6 +577,7 @@ void StartRPCThreads()
RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
+ rpc_acceptors.push_back(acceptor);
fListening = true;
}
catch(boost::system::system_error &e)
@@ -592,7 +592,6 @@ void StartRPCThreads()
endpoint.address(bindAddress);
boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
- rpc_acceptors.push_back(acceptor);
acceptor->open(endpoint.protocol());
acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
acceptor->bind(endpoint);
@@ -600,6 +599,7 @@ void StartRPCThreads()
RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
+ rpc_acceptors.push_back(acceptor);
fListening = true;
}
}