mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user