mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Clean up ClientInterface locking
This commit is contained in:
parent
d387e9b6d3
commit
1c73902005
3 changed files with 127 additions and 140 deletions
|
@ -452,7 +452,7 @@ void Server::handleCommand_GotBlocks(NetworkPacket* pkt)
|
|||
("GOTBLOCKS length is too short");
|
||||
}
|
||||
|
||||
m_clients.lock();
|
||||
ClientInterface::AutoLock lock(m_clients);
|
||||
RemoteClient *client = m_clients.lockedGetClientNoEx(pkt->getPeerId());
|
||||
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
|
@ -460,7 +460,6 @@ void Server::handleCommand_GotBlocks(NetworkPacket* pkt)
|
|||
*pkt >> p;
|
||||
client->GotBlock(p);
|
||||
}
|
||||
m_clients.unlock();
|
||||
}
|
||||
|
||||
void Server::process_PlayerPos(RemotePlayer *player, PlayerSAO *playersao,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue