aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-02-01 20:49:19 -0500
committersfan5 <sfan5@live.de>2022-02-03 11:43:51 +0100
commit1c73902005bb5c7a40be5571bff9c232d8c69536 (patch)
treec666e23d4411c58701a4b01963e9d965234db60c /src/network
parentd387e9b6d39d9689b79da21fa263c93d2b26e840 (diff)
downloadminetest-1c73902005bb5c7a40be5571bff9c232d8c69536.tar.gz
minetest-1c73902005bb5c7a40be5571bff9c232d8c69536.tar.bz2
minetest-1c73902005bb5c7a40be5571bff9c232d8c69536.zip
Clean up ClientInterface locking
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 12dc24460..a983424ba 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -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,