From 9ad2b9be45e768dc2bb088cf9fae71eaf11a7349 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 11 Oct 2018 11:13:54 -0700 Subject: [PATCH] Fix a rare race condition on shutdown: If we happen to get very unlucky and close the door when no accept operation is pending, the do_accept loop would never terminate. --- src/ripple/server/impl/Door.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ripple/server/impl/Door.h b/src/ripple/server/impl/Door.h index 32934101c..8ada7a10c 100644 --- a/src/ripple/server/impl/Door.h +++ b/src/ripple/server/impl/Door.h @@ -369,7 +369,7 @@ void Door:: do_accept(boost::asio::yield_context do_yield) { - for(;;) + while (acceptor_.is_open()) { error_code ec; endpoint_type remote_address;