io_context cleanups

This commit is contained in:
badaix 2022-04-03 15:27:28 +02:00
parent 945e19a4eb
commit bdc6299523
11 changed files with 18 additions and 26 deletions

View file

@ -55,7 +55,7 @@ ControlServer::~ControlServer()
void ControlServer::cleanup()
{
auto new_end = std::remove_if(sessions_.begin(), sessions_.end(), [](std::weak_ptr<ControlSession> session) { return session.expired(); });
auto new_end = std::remove_if(sessions_.begin(), sessions_.end(), [](const std::weak_ptr<ControlSession>& session) { return session.expired(); });
auto count = distance(new_end, sessions_.end());
if (count > 0)
{