Reduce log level for incoming crap packets
authorsapier <Sapier at GMX dot net>
Sat, 19 Apr 2014 20:12:01 +0000 (22:12 +0200)
committersapier <Sapier at GMX dot net>
Sat, 19 Apr 2014 20:12:01 +0000 (22:12 +0200)
Add log entry for peer timeout

src/connection.cpp
src/server.cpp

index ae1e4a1db68b39353b5cd45e479cbd479d6c120b..a51cc9df4e2a8acbc4c3ef278d2db5637ad8b6ed 100644 (file)
@@ -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
index ebde0d9efeb68d696e08d25e77274e0956b899cc..3ec6fee26df546f7d4c65f1879dbabafd54829da 100644 (file)
@@ -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;
        }