dht: save tokens from get_peers for announce

TODO: implement announce_peer
This commit is contained in:
2026-01-22 10:42:55 +09:00
parent c70d24be5c
commit 60ec9c19ea
2 changed files with 28 additions and 16 deletions

View File

@@ -63,7 +63,8 @@ func (dp *dialPool) stop() {
func (dp *dialPool) connectLoop(ctx context.Context) {
dhtCtx, cancel := context.WithTimeout(ctx, dhtTimeout)
addrs, err := dp.dht.GetPeers(dhtCtx, dp.infoHash)
// TODO: handle tokens
addrs, _, err := dp.dht.GetPeers(dhtCtx, dp.infoHash)
cancel()
if err != nil {