]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Assume connections have half the download bandwidth than calculated
authorMatt Joiner <anacrolix@gmail.com>
Sat, 30 Jun 2018 11:10:23 +0000 (21:10 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 30 Jun 2018 11:10:23 +0000 (21:10 +1000)
connection.go

index 4195683e77267c82f96952ef19084c7d4d1b705c..6ff1835da8a7980964e7cd97d298d9f538d003fe 100644 (file)
@@ -381,6 +381,8 @@ func (cn *connection) nominalMaxRequests() (ret int) {
                expectingTime := int64(cn.totalExpectingTime())
                if expectingTime == 0 {
                        expectingTime = math.MaxInt64
+               } else {
+                       expectingTime *= 2
                }
                return int(clamp(
                        1,