Begin tracking use of file descriptors in UDP tracker

This commit is contained in:
Matt Joiner 2016-01-31 19:04:15 +11:00
parent 3a206d4f12
commit 9824041e5a
1 changed files with 2 additions and 0 deletions

View File

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