From b218d8345df53bd5d93d5dfb3b0414c9e12d4e43 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Fri, 1 Dec 2023 18:52:32 +0700 Subject: [PATCH] save --- t.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 +}