Some tuning in m_max_packets_per_second algorithm
authorPerttu Ahola <celeron55@gmail.com>
Fri, 21 Oct 2011 08:52:26 +0000 (11:52 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 21 Oct 2011 08:52:26 +0000 (11:52 +0300)
src/connection.cpp

index 1c424839f96c739ff1676b8d661eec4c133f6031..d941f368a568d71ddf6f50a871bf4824a0ecd0dc 100644 (file)
@@ -469,8 +469,9 @@ void Peer::reportRTT(float rtt)
                        if(m_max_packets_per_second < 100)
                                m_max_packets_per_second += 2;
                } else {
-                       if(m_max_packets_per_second > 5)
-                               m_max_packets_per_second *= 0.5;
+                       m_max_packets_per_second *= 0.8;
+                       if(m_max_packets_per_second < 10)
+                               m_max_packets_per_second = 10;
                }
        }