2
0
mirror of synced 2025-02-24 06:38:14 +00:00

1310 Commits

Author SHA1 Message Date
Matt Joiner
e6d7b52638 Speed up connection.lastHelpful
Moving to reflection and interfaces has made it a bottleneck.
2016-08-14 22:39:23 +10:00
Matt Joiner
0bd5bcd1a5 cmd/torrentfs: Ensure unmounting occurs for some errors
Restructured so other errors can be handled better too.
2016-08-02 11:19:41 +10:00
Matt Joiner
6065a55818 Fix some more races in the status writing 2016-08-02 11:18:33 +10:00
perses
39cf5a7fde fs: fix isSubPath for top-level directories (#105) 2016-08-01 23:56:56 +10:00
Matt Joiner
00f406753a Fix build error with missinggo.Sorted 2016-07-30 00:48:15 +10:00
Matt Joiner
534275b625 Always run seeder and leecher on the same ports, to flex dht.Socket.CloseNow 2016-07-30 00:42:22 +10:00
Matt Joiner
1ca2e7e95a Add some extra conditions to prevent network activity when a torrent is closed
From suggestions by @axet, this might be a thing sometimes.
2016-07-30 00:41:45 +10:00
Matt Joiner
4143b7470d Begin exposing all the magic that Client.WriteStatus has so people can parse Client state their own way
It wasn't possible to move Client.WriteStatus to an external package to verify it doesn't depend on same-package access to data because then it can't be used in the tests, and it's extremely useful there. So I've settled for not locking the Client, and trying to use all the public methods. It's a work in progress.
2016-07-30 00:37:52 +10:00
Alexey Kuznetsov
49315045a0 it is actually sha1 hash size 2016-07-29 22:50:58 +10:00
perses
7d1443f4eb torrentfs: fix panic when testPeer is not specified (#103) 2016-07-27 12:35:52 +10:00
Matt Joiner
174e7192b5 Merge pull request #101 from perses/master
dirwatch: fix panic when attemting to copy func into [20]byte
2016-07-27 12:13:41 +10:00
ctn
a3739fc47c torrentfs: fix panic when testPeer is not specified 2016-07-26 23:30:40 +03:00
ctn
6525cf19f6 dirwatch: fix panic when attemting to copy func into [20]byte 2016-07-26 22:34:09 +03:00
Matt Joiner
debcb10b08 Some comments helping to break up the blocks in testClientTransfer 2016-07-24 00:35:34 +10:00
Matt Joiner
3c75f68413 Kick connections that contribute the final piece of missing metadata that fails to validate
Failing to get metainfo was resetting Torrent.metadataBytes, which caused arriving metadata data to appear to belong to nonexistent pieces, despite passing the check that we'd in fact requested them from the sending connection. This was unnecessarily noisy. Instead return an error if we got all the data, but couldn't set the Torrent's info bytes, that should propagate out and cause the connection that contributed the final missing piece to be dropped. This will at least provide some improved resistance to unfriendly behaviour on the network.
2016-07-24 00:34:40 +10:00
Matt Joiner
14e10ad58d Use utp.Socket.CloseNow to close a Client's uTP socket on Close
Fixes https://github.com/anacrolix/utp/issues/15.
2016-07-24 00:24:44 +10:00
Matt Joiner
b98c1a7edc dht: Add counters for writes and write errors 2016-07-23 22:39:06 +10:00
Matt Joiner
980cd69ab2 Break up the DHT announcer code into smaller functions, and add a 5 minute delay between announces 2016-07-23 22:38:31 +10:00
Matt Joiner
5cc735ef32 Merge pull request #99 from hustcat/magnet
Add Announce when AnnounceList is nil
2016-07-22 19:58:32 +10:00
Ye Yin
6a2137f2b6 Add Announce when AnnounceList is nil 2016-07-22 15:16:11 +08:00
Matt Joiner
1e8c6808b2 Improve readability of tracker status line 2016-07-14 13:08:52 +10:00
Matt Joiner
f5d58b3dc6 Unused *Client argument to Torrent.writeStatus 2016-07-12 21:23:20 +10:00
Matt Joiner
192bb829fb Remove duplicate seeder stat test assertions 2016-07-12 18:09:24 +10:00
Matt Joiner
29844b8b6c Few slices name changes 2016-07-12 17:49:00 +10:00
Matt Joiner
a1ba463750 Fix issue #97 2016-07-12 16:45:22 +10:00
Matt Joiner
507daba528 Rework tracker scraper code to allow tracker stats
Inspired by @axet's work.
2016-07-12 16:44:06 +10:00
Matt Joiner
6e399e8f50 Add test for issue #97 2016-07-12 16:42:54 +10:00
Matt Joiner
fbe0ded844 Add connection read stats 2016-07-12 16:42:04 +10:00
Matt Joiner
a4e140b939 New slices package 2016-07-12 16:40:14 +10:00
Matt Joiner
7f6b9dbf7a Remove unnecessary log in test 2016-07-11 15:03:29 +10:00
Matt Joiner
8d0bd910a7 List implemented BEPs
Fix issue #93.
2016-07-11 13:53:00 +10:00
Matt Joiner
6cdb542dea Remove broken coverage link from README 2016-07-11 13:12:52 +10:00
Matt Joiner
4e0b4c4321 Add axet's projects to README
Fixes #94.
2016-07-11 13:12:20 +10:00
Matt Joiner
f055abe2fc Fix issue #96
In the native file-based storage, mark pieces incomplete if the necessary file data is missing, or there's a read error on a piece.
2016-07-10 23:03:59 +10:00
Matt Joiner
9943fc3c58 Improve the log message when piece reads fail 2016-07-10 23:01:17 +10:00
Matt Joiner
363f042b95 Piece offset computed incorrectly in Reader.readOnceAt
Possibly it was only wrong on the last piece in rare circumstances.
2016-07-10 23:00:52 +10:00
Matt Joiner
0dbb943bc7 Skeleton TestMain
Used with manual inspection of process after tests finish.
2016-07-10 22:58:43 +10:00
Matt Joiner
40aa30d984 Rework the client transfer test to allow non-piece-based leecher storage
In preparation for tests for data going missing for the file-based storages. Issue #96
2016-07-10 15:01:08 +10:00
Matt Joiner
c6db777ed4 Bring back log message when a piece read fails unexpectedly 2016-07-10 14:00:25 +10:00
Matt Joiner
9c837a03d0 Move issue #95 tests into their own file 2016-07-09 00:36:53 +10:00
Matt Joiner
11a53fa732 Fix issue #95: Closing torrent storage also closed client storage for some storage types 2016-07-09 00:36:32 +10:00
Matt Joiner
408686b440 Add a test for issue #95 2016-07-09 00:28:12 +10:00
Matt Joiner
5475555252 metainfo: Move method in wrong file 2016-07-09 00:12:32 +10:00
Matt Joiner
2490c96f2f metainfo.Info.BuildFromFilePath: Ensure stable file ordering
Spotted by @axet, with precedent in Transmission.
2016-07-07 19:40:26 +10:00
Matt Joiner
838c35f3ea Solve the mystery bug with TestMaxEstablishedConns
Adding Torrent by infohash wasn't triggering connections to be accepted, when both TCP and uTP were enabled.
2016-07-07 14:49:18 +10:00
Matt Joiner
f39ab0cb8f Revert "Revert "TestSetMaxEstablishedConn does now work with utp""
This reverts commit 9b3869f3c53e65d0c42527c76504c14bdff068be.
2016-07-07 14:16:06 +10:00
Matt Joiner
a6cecc6b5f missinggo.Sort->SortSlice 2016-07-07 14:14:59 +10:00
Matt Joiner
9b3869f3c5 Revert "TestSetMaxEstablishedConn does now work with utp"
This reverts commit eb1be48cc6431cb380abbe11af6e72bbcec47b06.
2016-07-06 14:05:03 +10:00
Matt Joiner
40a78b7cdd Improve logging heuristic for sending chunks of pieces that go missing 2016-07-06 14:03:11 +10:00
Matt Joiner
cd1c1a9fed mmap storage: Close pieceCompletion on Close 2016-07-06 14:02:15 +10:00