Don't send client update as Client.Set response

This commit is contained in:
badaix 2016-01-07 20:12:22 +01:00
parent 86f766721d
commit 506f179ed2
3 changed files with 7 additions and 4 deletions

View file

@ -44,7 +44,7 @@ ControlServer::~ControlServer()
}
void ControlServer::send(const std::string& message)
void ControlServer::send(const std::string& message, const ControlSession* excludeSession)
{
std::unique_lock<std::mutex> mlock(mutex_);
for (auto it = sessions_.begin(); it != sessions_.end(); )
@ -63,7 +63,10 @@ void ControlServer::send(const std::string& message)
}
for (auto s : sessions_)
s->sendAsync(message);
{
if (s.get() != excludeSession)
s->sendAsync(message);
}
}