Skip to content
Permalink
Browse files

Don't spam server console on player/playersao error but just drop the…

… affected client
  • Loading branch information
sapier sapier
sapier authored and sapier committed Jun 29, 2014
1 parent ea6c383 commit ff36071d93266c1dd18708f8924d80aa1af5b33e
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/server.cpp
@@ -1789,18 +1789,20 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
}

Player *player = m_env->getPlayer(peer_id);
if(player == NULL){
if(player == NULL) {
errorstream<<"Server::ProcessData(): Cancelling: "
"No player for peer_id="<<peer_id
<<std::endl;
<< " disconnecting peer!" <<std::endl;
m_con.DisconnectPeer(peer_id);
return;
}

PlayerSAO *playersao = player->getPlayerSAO();
if(playersao == NULL){
if(playersao == NULL) {
errorstream<<"Server::ProcessData(): Cancelling: "
"No player object for peer_id="<<peer_id
<<std::endl;
<< " disconnecting peer!" <<std::endl;
m_con.DisconnectPeer(peer_id);
return;
}

0 comments on commit ff36071

Please sign in to comment.
You can’t perform that action at this time.