diff options
author | sapier <Sapier at GMX dot net> | 2014-04-19 22:12:01 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-04-19 22:12:01 +0200 |
commit | a0dd2d89f3a71a9650290a8607d773cc439c7d75 (patch) | |
tree | 1a9072c121240c335c0e037124535e2eb18e6b81 | |
parent | 8745935a062219cde1d10e1533c4543c609330be (diff) | |
download | minetest-a0dd2d89f3a71a9650290a8607d773cc439c7d75.tar.gz minetest-a0dd2d89f3a71a9650290a8607d773cc439c7d75.tar.bz2 minetest-a0dd2d89f3a71a9650290a8607d773cc439c7d75.zip |
Reduce log level for incoming crap packets
Add log entry for peer timeout
-rw-r--r-- | src/connection.cpp | 4 | ||||
-rw-r--r-- | src/server.cpp | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index ae1e4a1db..a51cc9df4 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -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 diff --git a/src/server.cpp b/src/server.cpp index ebde0d9ef..3ec6fee26 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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; } |