::stop now closes connections even though internal io_service is used
This commit is contained in:
parent
c03e378e69
commit
3541dd7879
2 changed files with 8 additions and 9 deletions
|
|
@ -360,10 +360,8 @@ namespace SimpleWeb {
|
|||
void stop() {
|
||||
std::unique_lock<std::mutex> lock(connections_mutex);
|
||||
for(auto it = connections.begin(); it != connections.end();) {
|
||||
if(!internal_io_service) {
|
||||
(*it)->attempt_reconnect = false;
|
||||
(*it)->close();
|
||||
}
|
||||
(*it)->attempt_reconnect = false;
|
||||
(*it)->close();
|
||||
it = connections.erase(it);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue