Client::close renamed to Client::stop
This commit is contained in:
parent
76f923d7bd
commit
490e33e2d1
2 changed files with 3 additions and 3 deletions
|
|
@ -352,7 +352,7 @@ namespace SimpleWeb {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Close connections
|
/// Close connections
|
||||||
void close() {
|
void stop() {
|
||||||
std::unique_lock<std::mutex> lock(connections_mutex);
|
std::unique_lock<std::mutex> lock(connections_mutex);
|
||||||
for(auto it = connections.begin(); it != connections.end();) {
|
for(auto it = connections.begin(); it != connections.end();) {
|
||||||
(*it)->attempt_reconnect = false;
|
(*it)->attempt_reconnect = false;
|
||||||
|
|
@ -366,7 +366,7 @@ namespace SimpleWeb {
|
||||||
auto lock = cancel_callbacks_mutex->unique_lock();
|
auto lock = cancel_callbacks_mutex->unique_lock();
|
||||||
*cancel_callbacks = true;
|
*cancel_callbacks = true;
|
||||||
}
|
}
|
||||||
close();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ int main() {
|
||||||
io_service->run();
|
io_service->run();
|
||||||
});
|
});
|
||||||
this_thread::sleep_for(chrono::milliseconds(100));
|
this_thread::sleep_for(chrono::milliseconds(100));
|
||||||
client.close();
|
client.stop();
|
||||||
this_thread::sleep_for(chrono::milliseconds(100));
|
this_thread::sleep_for(chrono::milliseconds(100));
|
||||||
thread.join();
|
thread.join();
|
||||||
assert(call);
|
assert(call);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue