Skip to content

Commit a0dd2d8

Browse files
sapiersapier
sapier
authored and
sapier
committedApr 19, 2014
Reduce log level for incoming crap packets
Add log entry for peer timeout
1 parent 8745935 commit a0dd2d8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎src/connection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1337,11 +1337,11 @@ void ConnectionSendThread::runTimeouts(float dtime)
13371337
*/
13381338
if(peer->isTimedOut(m_timeout))
13391339
{
1340-
LOG(derr_con<<m_connection->getDesc()
1340+
errorstream<<m_connection->getDesc()
13411341
<<"RunTimeouts(): Peer "<<peer->id
13421342
<<" has timed out."
13431343
<<" (source=peer->timeout_counter)"
1344-
<<std::endl);
1344+
<<std::endl;
13451345
// Add peer to the list
13461346
timeouted_peers.push_back(peer->id);
13471347
// Don't bother going through the buffers of this one

‎src/server.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
13281328
}
13291329
catch(con::PeerNotFoundException &e)
13301330
{
1331-
errorstream<<"Server::ProcessData(): Cancelling: peer "
1331+
/*
1332+
* no peer for this packet found
1333+
* most common reason is peer timeout, e.g. peer didn't
1334+
* respond for some time, your server was overloaded or
1335+
* things like that.
1336+
*/
1337+
infostream<<"Server::ProcessData(): Cancelling: peer "
13321338
<<peer_id<<" not found"<<std::endl;
13331339
return;
13341340
}

0 commit comments

Comments
 (0)