Commit Graph

1100 Commits

Author SHA1 Message Date
Matt Joiner fd42ed877f Don't run TestCompletedPieceWrongSize in parallel because it messes up logs 2016-02-22 00:31:06 +11:00
Matt Joiner c64ad19dbb Test a ton of permutations for readahead and responsive 2016-02-22 00:30:42 +11:00
Matt Joiner 4846021c0c Tidy up TestClientTransfer 2016-02-21 22:08:01 +11:00
Matt Joiner 61af11fddc Off by one error in torrent.pieceLength? 2016-02-21 17:25:47 +11:00
Matt Joiner 380dc7a2b4 Add peer_protocol.Integer.Int() 2016-02-21 17:25:26 +11:00
Matt Joiner 5b443fb63d Refresh all piece completion states when data is missing 2016-02-21 17:24:59 +11:00
Matt Joiner 99e9f41a33 Choke peers when we lose pieces they requested, and drop them if they request pieces we don't have 2016-02-21 17:22:55 +11:00
Matt Joiner 400fa1feaf Fix race updating piece priority when piece being read is unexpectedly unavailable 2016-02-21 03:33:39 +11:00
Matt Joiner e20858a1e8 Move dataReadAt to torrent.readAt, and do the waitNoPendingWrites check there 2016-02-21 03:32:59 +11:00
Matt Joiner dcdf85a474 Ditch the torrent stateMu for the client mutex 2016-02-21 03:31:50 +11:00
Matt Joiner f6472fc1fd Code comment 2016-02-20 14:41:04 +11:00
Matt Joiner 89ec237769 Improve log message 2016-02-20 14:40:55 +11:00
Matt Joiner f76d86da4f Use new error handling philosophy 2016-02-20 14:40:28 +11:00
Matt Joiner 3c801bed27 Export torrent.String to Torrent 2016-02-20 14:39:56 +11:00
Matt Joiner d5f888069f Ditch Data.WriteSectionTo, and fix cmd/torrent-verify 2016-02-18 11:45:31 +11:00
Matt Joiner dcce061152 Rework Reader reading, and TestCompletedPieceWrongSize 2016-02-17 18:26:10 +11:00
Matt Joiner bb77502eab data/file: Return EOF on reads past end 2016-02-17 17:58:20 +11:00
Matt Joiner 0acad8eeac Avoid error message when we attempt to complete a piece that's already complete 2016-02-17 17:21:03 +11:00
Matt Joiner b6a1a685cd Remove pointless code 2016-02-17 17:20:43 +11:00
Matt Joiner 589ab02dc4 Ensure piece completion state is correct at startup 2016-02-17 17:20:21 +11:00
Matt Joiner c89a391056 data/pieceStore: Incorrectly public PieceCompleted method 2016-02-17 17:10:34 +11:00
Matt Joiner 73208b97ca Code comments 2016-02-17 17:09:43 +11:00
Matt Joiner 7ab984ab52 Add a test for starting a torrent where pieces are already complete 2016-02-17 17:09:05 +11:00
Matt Joiner 90718d086c Rename issue 35 testing config function to avoid confusion 2016-02-17 17:08:01 +11:00
Matt Joiner 0f9f7ba01b Add torrent.completedPieces bitmap
Reduce load on data.PieceComplete for torrents with lots of pieces, when reader position changes. Not sure of the improvement yet.
2016-02-17 00:00:55 +11:00
Matt Joiner be6052912f Improve error message when piece fails to be completed
Happens occasionally on some servers, can't work out why.
2016-02-16 23:35:19 +11:00
Matt Joiner a6759b321a Only assert we should be requesting a piece in debug mode 2016-02-15 17:47:04 +11:00
Matt Joiner a17e31794c Merge pull request #64 from robaman/master
Retain query parameters from announce URL.
2016-02-15 07:22:36 +11:00
Robert Kästel 82b7abb877 Retain query parameters from announce URL. 2016-02-14 21:15:51 +01:00
Matt Joiner b514434581 Trigger piece request order changes on connections in a few spots
The client was requesting already obtained data in certain circumstances. This fixes it.
2016-02-11 17:57:57 +11:00
Matt Joiner 65fd332afd Use Cache.StatFile to get piece length in the backend 2016-02-10 00:48:23 +11:00
Matt Joiner 5b5ecb8f3b Still update a connections piece priority even if the peer doesn't have the piece 2016-02-10 00:47:53 +11:00
Matt Joiner 034c816934 torrent.piecePartiallyDownloaded incorrectly returned true when all the chunks were dirty 2016-02-10 00:46:54 +11:00
Matt Joiner 26fa2c4af8 Track posted message type counts 2016-02-10 00:45:47 +11:00
Matt Joiner 317783091d When we're choked, just forget the requests, we don't need to delete them individually anymore 2016-02-08 21:39:15 +11:00
Matt Joiner c674e0a65f Add some missing calls to torrent.updatePiecePriority 2016-02-08 21:38:30 +11:00
Matt Joiner 24b8b13d2d Fix pending of already completed pieces when pending ranges of pieces 2016-02-08 21:36:50 +11:00
Matt Joiner 3df7d61836 Reintroduce 64 outbound request cap 2016-02-08 16:09:12 +11:00
Matt Joiner dab95b5431 Remove unreachable code 2016-02-08 03:01:54 +11:00
Matt Joiner 623d9e0e06 Rework requesting of shuffled pending pieces 2016-02-07 21:58:48 +11:00
Matt Joiner 54b538d322 Export Torrent.PieceState() 2016-02-07 21:57:57 +11:00
Matt Joiner 096c870029 Fix overpublishing of piece state change during hashing 2016-02-07 21:56:59 +11:00
Matt Joiner dc215d083e Export PieceStateChange through piece state change pubsub 2016-02-07 21:55:47 +11:00
Matt Joiner 0c28a0f1b1 Use new tracker package interface 2016-02-07 18:49:35 +11:00
Matt Joiner f04af72757 tracker: Shoehorn old client implementations into new tracker Announce interface 2016-02-07 18:06:13 +11:00
Matt Joiner 4587f61074 tracker: Rename response->httpResponse 2016-02-07 17:45:46 +11:00
Matt Joiner 077ffaaf40 Prefix the Action constants
In preparation to rework the client interface
2016-02-07 17:16:01 +11:00
Matt Joiner 7ac5dfd828 Reinstate File.PrioritizeRegion() for backward compatibility 2016-02-07 17:15:06 +11:00
Matt Joiner 77d6e9e5cb Use new missinggo iterator style, and speed up torrent.connHasWantedPieces() 2016-02-07 01:22:31 +11:00
Matt Joiner 814daf6420 Publish changes in piece hashing state 2016-02-07 01:21:12 +11:00