Avoid duplicate API connections

refs #6724
This commit is contained in:
Gunnar Beutner 2014-08-05 09:10:59 +02:00
parent da41725e5b
commit 883170a806
1 changed files with 2 additions and 2 deletions

View File

@ -301,6 +301,8 @@ void ApiListener::NewClientHandler(const Socket::Ptr& client, ConnectionRole rol
aclient->Start();
if (endpoint) {
endpoint->AddClient(aclient);
if (need_sync) {
{
ObjectLock olock(endpoint);
@ -312,8 +314,6 @@ void ApiListener::NewClientHandler(const Socket::Ptr& client, ConnectionRole rol
}
SendConfigUpdate(aclient);
endpoint->AddClient(aclient);
} else
AddAnonymousClient(aclient);
}