anacrolix / anacrolix/torrent

High number of WebRTC peer connections is being created during transfer

Open
#805 5 comments 0 reactions 0 assignees View on GitHub
confirmed
Dominant language
Go
Stars
6.1k
Forks
690
Avg merge
3d 10h
Merged PRs (30d)
12

Description

Looking at the WebRTC / webtorrent part of the project, I noticed that, when downloading a file, a new offer is being created (seemingly) at every piece transferred. This happens when `TrackerClient.Announce()` is called, in which `TrackerClient.newOffer()` creates a new offer with a new WebRTC peer connection.

I'd imagined that we'd create a peer connection for each connection to a torrent peer (naming gets a bit confusing here) and keep it open for as long as we're transferring pieces from that peer, but it looks like this is not the case. I was wondering whether this is part of the torrent protocol, or if there is another reason for it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.