Closed marcovidonis closed 5 months ago
I usually have a HTTP handler writing the torrent status somewhere. It's textual but you can usually work out problems from that and the goroutine trace. Here's an example: https://github.com/anacrolix/confluence/blob/10e015cde1c83daa33fcbe78f70d9b6fc749700f/confluence/handlers.go#L64-L66. You'll be able to see what the piece state is of the connected peers, and the amount of redundancy for each piece. You'll probably find some pieces are missing from the swarm.
Thanks! That might just be what I need, I'll look into that!
Question answered.
I'm looking for a way to understand and report why a downloading torrent stops before it's complete. I wonder whether there is some info available on what is being exchanged between leecher, seeder and tracker and how I could tap into that (and perhaps surface this info to outside the package) to infer what's happening. For example: Have all seeders disappeared? Has the leecher lost connection to the tracker? Etc.
I've gone through
PeerConn
, but I haven't been able to find anything holding the state of the connection (perhaps I missed something). I did notice anexpVar.Map
variable calledtorrent
that keeps a count of several events, but I'm not sure whether it could be useful for this purpose.Do you have any suggestions on how I could go about this?