mirror of
https://github.com/minetest/minetest.git
synced 2025-03-25 03:32:31 +01:00
Don't spam server console on player/playersao error but just drop the affected client
This commit is contained in:
@ -1789,18 +1789,20 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player *player = m_env->getPlayer(peer_id);
|
Player *player = m_env->getPlayer(peer_id);
|
||||||
if(player == NULL){
|
if(player == NULL) {
|
||||||
errorstream<<"Server::ProcessData(): Cancelling: "
|
errorstream<<"Server::ProcessData(): Cancelling: "
|
||||||
"No player for peer_id="<<peer_id
|
"No player for peer_id="<<peer_id
|
||||||
<<std::endl;
|
<< " disconnecting peer!" <<std::endl;
|
||||||
|
m_con.DisconnectPeer(peer_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerSAO *playersao = player->getPlayerSAO();
|
PlayerSAO *playersao = player->getPlayerSAO();
|
||||||
if(playersao == NULL){
|
if(playersao == NULL) {
|
||||||
errorstream<<"Server::ProcessData(): Cancelling: "
|
errorstream<<"Server::ProcessData(): Cancelling: "
|
||||||
"No player object for peer_id="<<peer_id
|
"No player object for peer_id="<<peer_id
|
||||||
<<std::endl;
|
<< " disconnecting peer!" <<std::endl;
|
||||||
|
m_con.DisconnectPeer(peer_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user