]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Reduce UDP tracker response buffer size from 64KiB to 2KiB
authorMatt Joiner <anacrolix@gmail.com>
Wed, 30 Sep 2015 14:36:41 +0000 (00:36 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 30 Sep 2015 14:36:41 +0000 (00:36 +1000)
tracker/udp.go

index 3864bee2b1e3c76e53efa066ea93d224ac934389..815a29987b6bf0b9a4dfbe857768f086be3ac6a9 100644 (file)
@@ -187,7 +187,7 @@ func (c *udpClient) request(action Action, args interface{}, options []byte) (re
                return
        }
        c.socket.SetReadDeadline(time.Now().Add(timeout(c.contiguousTimeouts)))
-       b := make([]byte, 0x10000) // IP limits packet size to 64KB
+       b := make([]byte, 0x800) // 2KiB
        for {
                var n int
                n, err = c.socket.Read(b)