diff --git a/t.go b/t.go index 45856cc7ac..6a4607068a 100644 --- a/t.go +++ b/t.go @@ -274,3 +274,13 @@ func (t *Torrent) PeerConns() []*PeerConn { } return ret } + +func (t *Torrent) WebseedPeerConns() []*Peer { + t.cl.rLock() + defer t.cl.rUnlock() + ret := make([]*Peer, 0, len(t.conns)) + for _, c := range t.webSeeds { + ret = append(ret, c) + } + return ret +}