std::string playername = "";
PlayerSAO *playersao = NULL;
m_clients.Lock();
- RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id, CS_InitDone);
- if (client != NULL) {
- playername = client->getName();
- playersao = emergePlayer(playername.c_str(), peer_id);
+ try {
+ RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id, CS_InitDone);
+ if (client != NULL) {
+ playername = client->getName();
+ playersao = emergePlayer(playername.c_str(), peer_id);
+ }
+ } catch (std::exception &e) {
+ m_clients.Unlock();
+ throw;
}
m_clients.Unlock();
RemoteClient *client = m_clients.lockedGetClientNoEx(*i, CS_Active);
if (client == NULL)
- return;
+ continue;
total_sending += client->SendingCount();
client->GetNextBlocks(m_env,m_emerge, dtime, queue);