Reverted stop changes due to complications when running on one core
This commit is contained in:
parent
7d5599b8e5
commit
76f923d7bd
1 changed files with 4 additions and 5 deletions
|
|
@ -362,6 +362,9 @@ namespace SimpleWeb {
|
|||
internal_io_service = true;
|
||||
}
|
||||
|
||||
if(io_service->stopped())
|
||||
io_service->reset();
|
||||
|
||||
asio::ip::tcp::endpoint endpoint;
|
||||
if(config.address.size() > 0)
|
||||
endpoint = asio::ip::tcp::endpoint(asio::ip::address::from_string(config.address), config.port);
|
||||
|
|
@ -400,12 +403,8 @@ namespace SimpleWeb {
|
|||
void stop() {
|
||||
if(acceptor) {
|
||||
acceptor->close();
|
||||
if(internal_io_service) {
|
||||
if(internal_io_service)
|
||||
io_service->stop();
|
||||
while(!io_service->stopped())
|
||||
std::this_thread::yield();
|
||||
io_service->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue