tsan: fix rpc shutdown acceptor issue (#1681)

This commit is contained in:
cryptocode 2019-02-01 14:16:57 +01:00 committed by GitHub
commit a275d73d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ void nano::rpc::accept ()
{
auto connection (std::make_shared<nano::rpc_connection> (node, *this));
acceptor.async_accept (connection->socket, [this, connection](boost::system::error_code const & ec) {
if (acceptor.is_open () && ec != boost::asio::error::operation_aborted)
if (ec != boost::asio::error::operation_aborted && acceptor.is_open ())
{
accept ();
}