2
0
mirror of synced 2025-02-24 14:48:27 +00:00

2323 Commits

Author SHA1 Message Date
Yaroslav Kolomiiets
b4e10e00a9 add BEP references to documentation of the metadata fields 2020-05-03 14:06:24 +10:00
Matt Joiner
04ff050ecd Disable keepalives for http trackers
Should work around an issue with S3 trackers holding connections open for very long periods.
2020-04-28 09:15:06 +10:00
Matt Joiner
188aa800b2 Adjust websocket tracker logging levels 2020-04-28 09:14:24 +10:00
Matt Joiner
15fff58d7b Rework tracker status lines 2020-04-28 09:13:44 +10:00
Matt Joiner
cad8802e9c Update all dependencies 2020-04-23 13:09:27 +10:00
Matt Joiner
3e9a5a4aec Expose ClientConfig.Extensions
Also run the storage failure test with fast disabled for the seeder. This probably would have tickled some issues in the past, so it seems like a good place to try it out.
2020-04-23 13:03:40 +10:00
Matt Joiner
86d5ad4b2c Don't delete requests if we're choked per BEP 6
This should make the expected receive chunk counts match up more correctly. It doesn't seem to affect tests at the moment, but then we don't verify the expected receive chunk counts are correct either.
2020-04-23 12:36:19 +10:00
Matt Joiner
12e377e3fe Count expected received chunks instead of flagging them
This can be racy. In the TestReceiveChunkStorageFailure, when we have a storage write failure, we request the chunk again, but the peer has sometimes already sent it, and we return from the connection read loop with unexpected chunk after receiving it twice.
2020-04-23 12:34:43 +10:00
Matt Joiner
03887dbc80 Close leaked Clients in test 2020-04-23 12:28:48 +10:00
Matt Joiner
f432430256 Use anacrolix/log in test 2020-04-23 11:30:19 +10:00
Matt Joiner
8c8c799612 Update to the most recent bazil.org/fuse that supports MacOS 2020-04-23 11:26:22 +10:00
Matt Joiner
3226dc1ccd Rename per-torrent ws tracker and output stats 2020-04-22 11:42:31 +10:00
Matt Joiner
a5db7a7fa6 Remove websocket tracker logging level override 2020-04-22 11:41:12 +10:00
Matt Joiner
0ab6d108be Pool webtorrent tracker websockets at the Client level 2020-04-21 18:08:43 +10:00
Matt Joiner
cc69c3ec8f New metrics and log change 2020-04-20 14:00:29 +10:00
Matt Joiner
fb6af2a426 Remove unused outbound offer answered field 2020-04-20 14:00:10 +10:00
Matt Joiner
c074b30d94 Log webrtc connection errors and rework webtorrent.TrackerClient 2020-04-20 13:42:25 +10:00
Matt Joiner
4045e235a8 Update anacrolix/missinggo/v2 import 2020-04-20 13:41:32 +10:00
Matt Joiner
520d3c38e3 Fix some webtorrent PeerConnection leaks 2020-04-20 10:21:31 +10:00
Matt Joiner
079f346ca9 Readability 2020-04-19 11:30:48 +10:00
Matt Joiner
4a2802a702 Logging fixes 2020-04-18 17:45:01 +10:00
Matt Joiner
013fa1df5a Fix transfer test check for seeder piece counts
I suspect that there's a race where a connection is established to the seeder, but we haven't received it's completed piece information yet, and we already finished reading all the data we need from another connection. Probably comes up now because pending peers with the same address aren't clobbering each other since that was fixed.
2020-04-17 11:40:25 +10:00
Yaroslav Kolomiiets
dad28e674e cmd/torrent: add -ipv4/-ipv6 options 2020-04-17 11:06:50 +10:00
Matt Joiner
48bea90f0a Pull anacrolix dht and upnp log level handling updates 2020-04-16 17:51:57 +10:00
Matt Joiner
2f3d41765b Fix race in Torrent.PeerConns 2020-04-16 17:21:15 +10:00
Matt Joiner
d05ce2d274 Update anacrolix/log 2020-04-16 17:20:58 +10:00
Matt Joiner
5b0c46cd54 Fix false positive Goland code lint 2020-04-16 14:52:52 +10:00
Matt Joiner
e5f7765dfa Fix small cache transfer tests
Since hashing Peer Addrs in the Torrent pending peers, clients are getting more than one connection to the seeder in the tests and failing.
2020-04-16 14:12:17 +10:00
Matt Joiner
c2210c058c Fix pending peer counts in transfer tests
Also expose number of peers successfully added in some method returns.
2020-04-16 14:09:45 +10:00
Matt Joiner
070e11a0dd Adjust recently added logging 2020-04-16 12:17:18 +10:00
Matt Joiner
730cebf5aa Only announce to DHT if we have dialers or listeners 2020-04-16 12:03:27 +10:00
Matt Joiner
eec337d4bc Set tracker announce numWant to 0 if we're unable to dial 2020-04-16 12:02:34 +10:00
Matt Joiner
74986db9ed Don't try to do conventional dials if we have no dialers
Stops us from consuming all the peers we store for no reason.
2020-04-16 12:00:49 +10:00
Matt Joiner
6a86e9e999 Include hashed addr when comparing prioritized peers
In particular, fixes the issue where peers where can't calculate a priority and fallback on 0 clobber each other.
2020-04-16 11:59:31 +10:00
Matt Joiner
5f47e808fb Update the peersAddedBySource expvar 2020-04-16 11:56:58 +10:00
Matt Joiner
d4430e89b6 Fix crash with conventional trackers when tcp and utp are disabled
Fixes #396.
2020-04-16 10:27:17 +10:00
Matt Joiner
8cf3ce187d cmd/torrent: Fix -{utp,tcp}Peers defaults
Addresses https://github.com/anacrolix/torrent/issues/396#issuecomment-614210103.
2020-04-16 10:26:37 +10:00
Yaroslav Kolomiiets
26071eaad0 PEX: integrate with send throttling 2020-04-16 09:37:38 +10:00
Matt Joiner
3d87c20766 Count outgoing extended messages by extension protocol 2020-04-15 18:09:15 +10:00
Matt Joiner
166f878bdc Fix change in Client.newConnection 2020-04-15 17:28:39 +10:00
Matt Joiner
c27e3f8de3 Merge branch 'webtorrent' 2020-04-15 17:26:46 +10:00
Matt Joiner
92162295af Clone the AnnounceList out of Torrent.Metainfo
Should fix a race with Torrent.AddTrackers
2020-04-15 17:26:02 +10:00
Matt Joiner
bb3ae90cd2 Comments and reduced locking in trackerScraper.Run 2020-04-15 17:26:02 +10:00
Yaroslav Kolomiiets
2b2c480706 PEX: add periodic deltas 2020-04-15 17:24:44 +10:00
Yaroslav Kolomiiets
93430aa01a PEX: add connection tracking 2020-04-15 17:24:44 +10:00
Yaroslav Kolomiiets
634edd2875 Share current connections with peers over PEX (anacrolix#341) 2020-04-15 17:24:44 +10:00
Matt Joiner
0123f5e6f6 More error handling and logging clean up 2020-04-14 10:47:26 +10:00
Matt Joiner
f90cbcce20 Fix locks around Torrent.announceRequest 2020-04-13 19:13:59 +10:00
Matt Joiner
05e448d132 webtorrent logging improvements 2020-04-13 19:13:23 +10:00
Matt Joiner
93366bb63a Rename webtorrent.NewClient->NewTrackerClient 2020-04-13 19:12:54 +10:00