]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Begin tracking use of file descriptors in UDP tracker
authorMatt Joiner <anacrolix@gmail.com>
Sun, 31 Jan 2016 08:04:15 +0000 (19:04 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 31 Jan 2016 08:04:15 +0000 (19:04 +1100)
tracker/udp.go

index 815a29987b6bf0b9a4dfbe857768f086be3ac6a9..d853674753f771095d657c99256c9efcb1be7abf 100644 (file)
@@ -12,6 +12,7 @@ import (
        "time"
 
        "github.com/anacrolix/missinggo"
+       "github.com/anacrolix/missinggo/pproffd"
 
        "github.com/anacrolix/torrent/util"
 )
@@ -251,6 +252,7 @@ func (c *udpClient) Connect() (err error) {
                if err != nil {
                        return
                }
+               c.socket = pproffd.WrapNetConn(c.socket)
        }
        b, err := c.request(Connect, nil, nil)
        if err != nil {