We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40ad976 commit 7ebd5daCopy full SHA for 7ebd5da
src/network/serverpackethandler.cpp
@@ -438,18 +438,20 @@ void Server::handleCommand_GotBlocks(NetworkPacket* pkt)
438
u8 count;
439
*pkt >> count;
440
441
- RemoteClient *client = getClient(pkt->getPeerId());
442
-
443
if ((s16)pkt->getSize() < 1 + (int)count * 6) {
444
throw con::InvalidIncomingDataException
445
("GOTBLOCKS length is too short");
446
}
447
+ m_clients.lock();
+ RemoteClient *client = m_clients.lockedGetClientNoEx(pkt->getPeerId());
448
+
449
for (u16 i = 0; i < count; i++) {
450
v3s16 p;
451
*pkt >> p;
452
client->GotBlock(p);
453
454
+ m_clients.unlock();
455
456
457
void Server::process_PlayerPos(RemotePlayer *player, PlayerSAO *playersao,
0 commit comments