forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Closed
Description
if you bind async_server::run to a thread and then immediately call stop on that server instance, you can end up with a sync issue where calling cancel or similar on the acceptor will throw because it may not be open and listening yet.
a possible fix would be to check if async_server is in listening mode yet or not, and then only attempt to cancel the acceptor if so.
further, checking if async_server is stopping before attempting to start_listening would be useful too.