Fix possible deadlock in error conditions

master
sapier 2014-05-11 00:14:57 +02:00
parent c8aed03ace
commit f76b9d724b
1 changed files with 3 additions and 1 deletions

View File

@ -2894,8 +2894,10 @@ bool Server::getClientInfo(
m_clients.Lock();
RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id,Invalid);
if (client == NULL)
if (client == NULL) {
m_clients.Unlock();
return false;
}
*uptime = client->uptime();
*ser_vers = client->serialization_version;