Restart the RPC connection acceptor in the face of errors (#1390)
This commit is contained in:
parent
f3c9ea72e6
commit
2406cdc837
2 changed files with 4 additions and 2 deletions
|
@ -155,9 +155,10 @@ void rai::rpc::accept ()
|
|||
{
|
||||
auto connection (std::make_shared<rai::rpc_connection> (node, *this));
|
||||
acceptor.async_accept (connection->socket, [this, connection](boost::system::error_code const & ec) {
|
||||
accept ();
|
||||
|
||||
if (!ec)
|
||||
{
|
||||
accept ();
|
||||
connection->parse_connection ();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -97,9 +97,10 @@ void rai::rpc_secure::accept ()
|
|||
{
|
||||
auto connection (std::make_shared<rai::rpc_connection_secure> (node, *this));
|
||||
acceptor.async_accept (connection->socket, [this, connection](boost::system::error_code const & ec) {
|
||||
accept ();
|
||||
|
||||
if (!ec)
|
||||
{
|
||||
accept ();
|
||||
connection->parse_connection ();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue