mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-06 05:12:26 +08:00
Fixed bug in handling rejection of screen with name that's already
in use. The client was being correctly rejected but the already connected client was being forcefully disconnected too because the client to disconnect was found by looking up the client by name. We now instead look up the client by IClient*.
This commit is contained in:
@@ -1507,8 +1507,8 @@ bool
|
||||
CServer::removeClient(IClient* client)
|
||||
{
|
||||
// return false if not in list
|
||||
CClientList::iterator i = m_clients.find(getName(client));
|
||||
if (i == m_clients.end()) {
|
||||
CClientSet::iterator i = m_clientSet.find(client);
|
||||
if (i == m_clientSet.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1521,8 +1521,8 @@ CServer::removeClient(IClient* client)
|
||||
client->getEventTarget());
|
||||
|
||||
// remove from list
|
||||
m_clients.erase(i);
|
||||
m_clientSet.erase(client);
|
||||
m_clients.erase(getName(client));
|
||||
m_clientSet.erase(i);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user