Skip to content

Commit

Permalink
startRpc at last when everything is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Apr 28, 2019
1 parent 82d1dc3 commit c98b955
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libinitializer/Initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ void Initializer::init(std::string const& _path)
m_rpcInitializer->setSSLContext(
m_secureInitializer->SSLContext(SecureInitializer::Usage::ForRPC));
m_rpcInitializer->initChannelRPCServer(pt);
m_rpcInitializer->channelRPCServer()->StartListening();

m_ledgerInitializer = std::make_shared<LedgerInitializer>();
m_ledgerInitializer->setP2PService(m_p2pInitializer->p2pService());
Expand All @@ -69,6 +68,8 @@ void Initializer::init(std::string const& _path)
m_rpcInitializer->setLedgerManager(m_ledgerInitializer->ledgerManager());
m_rpcInitializer->initConfig(pt);
m_ledgerInitializer->startAll();
/// start RPC at last when everything is ready
m_rpcInitializer->channelRPCServer()->StartListening();
}
catch (std::exception& e)
{
Expand Down

0 comments on commit c98b955

Please sign in to comment.