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.
This commit is contained in:
JoelKatz
2018-10-11 11:13:54 -07:00
committed by Nik Bougalis
parent 0d2b2923da
commit 9ad2b9be45

View File

@@ -369,7 +369,7 @@ void
Door<Handler>::
do_accept(boost::asio::yield_context do_yield)
{
for(;;)
while (acceptor_.is_open())
{
error_code ec;
endpoint_type remote_address;