Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reduce log level for incoming crap packets
Add log entry for peer timeout
  • Loading branch information
sapier authored and sapier committed Apr 19, 2014
1 parent 8745935 commit a0dd2d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/connection.cpp
Expand Up @@ -1337,11 +1337,11 @@ void ConnectionSendThread::runTimeouts(float dtime)
*/
if(peer->isTimedOut(m_timeout))
{
LOG(derr_con<<m_connection->getDesc()
errorstream<<m_connection->getDesc()
<<"RunTimeouts(): Peer "<<peer->id
<<" has timed out."
<<" (source=peer->timeout_counter)"
<<std::endl);
<<std::endl;
// Add peer to the list
timeouted_peers.push_back(peer->id);
// Don't bother going through the buffers of this one
Expand Down
8 changes: 7 additions & 1 deletion src/server.cpp
Expand Up @@ -1328,7 +1328,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
}
catch(con::PeerNotFoundException &e)
{
errorstream<<"Server::ProcessData(): Cancelling: peer "
/*
* no peer for this packet found
* most common reason is peer timeout, e.g. peer didn't
* respond for some time, your server was overloaded or
* things like that.
*/
infostream<<"Server::ProcessData(): Cancelling: peer "
<<peer_id<<" not found"<<std::endl;
return;
}
Expand Down

0 comments on commit a0dd2d8

Please sign in to comment.