Commit Graph

3309 Commits

Author SHA1 Message Date
Matt Joiner 560b463983 Comment out pending requests tests and asserts
These need to be updated. BSI for pending requests removes an enormous amount of memory use for very large torrents.
2021-11-25 22:59:20 +11:00
Matt Joiner 8ddbf5a852 Revert "Use a flat slice for pending request counts"
This reverts commit dfc421824c.
2021-11-25 22:55:02 +11:00
Matt Joiner aaec4dbd80 tracker/udp: Panic on read errors if ConnClient not closed
There's nothing exposed to handle this error currently, and if it occurs, it's better not to fail in silence. I'm currently debugging a situation where ConnClients stop working, this would be a condition we'd want to know about.
2021-11-23 08:35:45 +11:00
Matt Joiner 615669ecf8 Improve logging of UDP tracker packet dispatch error 2021-11-23 08:33:29 +11:00
Matt Joiner aae32e2a31 Wrap UDP tracker response error 2021-11-23 08:32:25 +11:00
Matt Joiner 6cb65f4ecf Don't dial in UDP tracking
This could fix an issue where tracker addresses change, but we're already bound to a particular address and so fail to receive any more responses.
It should also make it easier to share UDP sockets between UDP tracker clients, although that's not currently implemented.
2021-11-22 18:11:09 +11:00
Matt Joiner 8555ab7f21 Doc comments 2021-11-22 18:10:47 +11:00
Matt Joiner 65ceef557a Remove CGO build flags for pure-Go squirrel branch 2021-11-19 20:29:30 +11:00
Matt Joiner 3ab251fcf5 Use zombiezen branch of squirrel 2021-11-19 20:10:07 +11:00
Matt Joiner 357896fb65 gofumpt 2021-11-19 16:19:32 +11:00
Matt Joiner 24f3ecc7cd Use zombiezen sqlite for piece completion 2021-11-19 16:18:41 +11:00
Matt Joiner 8e5ae65837 Quote peer extension names to expvar 2021-11-19 13:02:42 +11:00
Matt Joiner 370fc56c16 Pull synchronous firewall callback performance improvement
Reduces CPU overhead when receiving lot of UDP traffic.
2021-11-17 14:24:38 +11:00
Matt Joiner 2f907e84a8 Optimize PeerConn.peerHasAllPieces 2021-11-17 14:01:11 +11:00
Matt Joiner 0f81e0011f Avoid calling net.Conn methods with the Client mutex locked
The utp firewall callback might want to use it. I can't think of a better way to determine with an incoming connection request should be blocked.
2021-11-17 14:00:50 +11:00
Matt Joiner e81e12fab1 Use tagged version of github.com/anacrolix/fuse 2021-11-16 18:27:11 +11:00
Matt Joiner 8a7ddab785 Switch to github.com/anacrolix/fuse 2021-11-16 18:20:02 +11:00
Matt Joiner 8e44c702c1 Remove dependency on and exclude of github.com/willf/bitset 2021-11-16 17:36:48 +11:00
Matt Joiner c442a22ac2 Provide context to readahead func 2021-11-15 00:53:42 +11:00
Matt Joiner 9cc3201df9 Add Reader.SetReadaheadFunc
Fixes https://github.com/anacrolix/torrent/issues/687.
2021-11-15 00:53:42 +11:00
Matt Joiner 71cbea2fbc Add a comment about not discarding in webseed OK response bodies 2021-11-14 14:01:46 +11:00
Matt Joiner 60dd68ede9 Don't log legitimate non-range requests 2021-11-12 15:58:32 +11:00
Matt Joiner 8af369c11a Should fix failing go1.16 CI build 2021-11-12 15:18:20 +11:00
Matt Joiner 63b7215892 Improve error handling for bad webseeds
DNS "no such host" errors didn't interrupt the stream of outbound requests.
2021-11-12 14:43:22 +11:00
Matt Joiner a90ae5aed4 Pass HTTP Proxy config into webseeding HTTP client 2021-11-12 14:16:14 +11:00
Matt Joiner 1071e261e1 Remove unused Client.updateRequests 2021-11-12 13:55:43 +11:00
Matt Joiner dea0e41e29 Boost webseed max requests 2021-11-12 13:51:58 +11:00
Matt Joiner a7dff20e3f Increment webseed peer piece availability 2021-11-12 13:41:55 +11:00
Matt Joiner 09d9a070e9 Allow non-partial webseed part responses for small files 2021-11-12 13:30:13 +11:00
Matt Joiner 411ebdbe28 webseed: Close unused part responses after error
Also don't bother to read their response bodies.
2021-11-12 12:40:15 +11:00
Matt Joiner 2fd928b918 Don't use non-directory webseed URLs for multi-file torrents 2021-11-12 12:37:40 +11:00
Matt Joiner de95cf6db6 Make TorrentSpecFromMetaInfoErr still usable on info error 2021-11-12 10:46:35 +11:00
Matt Joiner 1bf7019340 Comment that BEP 19 is WebSeeds 2021-11-12 10:45:47 +11:00
Matt Joiner 801fa59d5a cmd/torrentfs: Add missing envpprof.Stop 2021-11-12 10:37:21 +11:00
Matt Joiner 4b9dfa0af7 Pull uninitialized DHT store fix from anacrolix/dht
Fixes https://github.com/anacrolix/torrent/issues/686.
2021-11-10 09:48:01 +11:00
Matt Joiner c6ee03f449 gofumpt 2021-11-08 14:47:01 +11:00
Matt Joiner f86af21cd2 Improve dht bootstrap stats logging 2021-11-05 09:30:25 +11:00
Matt Joiner eaeb38b18c cmd/torrent: Add serve subcommand 2021-11-04 20:02:55 +11:00
Matt Joiner 59d5e17ace bencode: Fix marshalling of unaddressable array of bytes 2021-11-04 20:01:25 +11:00
Matt Joiner c7ff32f01c Export addTorrentOpts
Now I see what the lint was complaining about.
2021-11-04 20:00:31 +11:00
Matt Joiner bc5cce8dca Move download subcmd code into separate file 2021-11-04 11:36:34 +11:00
Matt Joiner 002de0ebe3 cmd/torrent: Add bencode {json,spew} commands 2021-11-03 13:49:06 +11:00
Matt Joiner 68fdd41d89 bencode.Bytes: Tests and stricter checks 2021-11-02 17:28:05 +11:00
Matt Joiner 1f22c51366 Run Go GitHub action with Go 1.16 as well as 1.17
1.16 is still used by some downstream projects, and it might ensure support for pkg.go.dev (via old build constraint tags).
2021-11-01 12:21:20 +11:00
Matt Joiner 70d15d405c Run Go GitHub action on all branches 2021-11-01 12:21:20 +11:00
Matt Joiner b088c08acd Remove some unused parameter names
https://deepsource.io/gh/anacrolix/torrent/run/cfd6fa3d-c65b-4bf7-83f7-3bee87c21a4b/go/RVV-B0012
2021-11-01 11:53:58 +11:00
Matt Joiner 1788303405 Alter some directory permissioning in storage 2021-11-01 11:50:12 +11:00
Matt Joiner 8d193edb7e Remove unused Torrent.numActivePeers 2021-11-01 11:49:36 +11:00
Matt Joiner 87a67db680 Remove unused conn piece inclinations 2021-11-01 11:49:27 +11:00
afjoseph 487352fa5b fixup! [trackerscraper] Add custom DNS lookup function 2021-11-01 11:26:58 +11:00