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

1912 Commits

Author SHA1 Message Date
Matt Joiner
ba9935d522 Add more worseConn comparisons
Should fix #264.
2018-07-10 09:50:39 +10:00
Matt Joiner
a7e338a3f1 More sortimports 2018-07-07 11:40:06 +10:00
Matt Joiner
fad06c7ddf sortimports 2018-07-07 11:36:58 +10:00
Matt Joiner
316640f921 Fix panic when failing to parse tracker URL 2018-07-07 11:35:47 +10:00
Matt Joiner
e0f0617b0b Comments and readability 2018-07-07 11:33:48 +10:00
Matt Joiner
e1d6fc2341 Add torrent.InfoHash type alias 2018-07-07 11:32:52 +10:00
Matt Joiner
76a3c0891a Expose handshake stuff in peer_protocol 2018-07-07 11:31:29 +10:00
Matt Joiner
a69cd7bb9b fs/test.sh: Add sudo before happy path umount again 2018-06-30 22:03:29 +10:00
Matt Joiner
5f20a21c9d Change the duplicateRequestTimeout to 1s 2018-06-30 21:10:48 +10:00
Matt Joiner
15f3c822c5 Assume connections have half the download bandwidth than calculated 2018-06-30 21:10:23 +10:00
Matt Joiner
b2117bc571 Use timers for duplicate requests
Nothing was triggering request updates when timeouts expired. This is the simplest fix, no performance considered.
2018-06-30 00:10:31 +10:00
Matt Joiner
716fd43d44 Run fs/test.sh in a temporary directory and make it clean up 2018-06-30 00:08:01 +10:00
Matt Joiner
a3bc6398c8 Merge messageTypes{Sent,Posted} into torrent expvar 2018-06-29 22:10:21 +10:00
Matt Joiner
60dd0eed53 Make requestStrategy 3 the default
Fixes #253.
2018-06-28 12:06:21 +10:00
Matt Joiner
7b924822c7 Fix panic in connection.iterPendingPieces when the info isn't available
Triggered by connection.iterUnbiasedPieceRequestOrder calling Torrent.numPieces. We shouldn't be iterating pieces when there's no info anyway, so don't yield any. Mentioned in https://github.com/anacrolix/torrent/issues/253#issuecomment-400350386.
2018-06-28 11:12:49 +10:00
Matt Joiner
bdf8619cf3 Missed deferring release of an exported status writer 2018-06-26 21:19:49 +10:00
Matt Joiner
8255194c64 Fix racy Torrent.wantConns check when adding connections 2018-06-26 20:47:21 +10:00
Matt Joiner
6212973011 Add more context to an error 2018-06-26 20:24:39 +10:00
Matt Joiner
57849844ae Rework status export in tests to allow count > 1 without a server for every test 2018-06-26 19:54:48 +10:00
Matt Joiner
c921242f30 Do requests synchronously, and don't request from hashing or queued pieces
Calculating the desired state was a nice idea, but too hard to debug. This way should also be faster.
2018-06-26 14:51:55 +10:00
Matt Joiner
7dd532d46f Check that chunks we request aren't being hashed or queued for hash 2018-06-26 13:04:15 +10:00
Matt Joiner
67c0ed8518 Fix BenchmarkConnectionMainReadLoop 2018-06-25 14:09:08 +10:00
Matt Joiner
85dc3c204a Rework stats for receiving chunks
Related to #253.
2018-06-25 14:06:30 +10:00
Matt Joiner
7619994ef5 Remove premature initialization of Torrent.lastRequested 2018-06-25 14:03:22 +10:00
Matt Joiner
0330b87288 Drop connections that send chunks we shouldn't receive 2018-06-24 20:35:46 +10:00
Matt Joiner
195695042d Add requestStrategy 3, which duplicates requests only after a timeout
Possible solution for #253.
2018-06-24 20:04:31 +10:00
Matt Joiner
d2602c7935 Write received chunks that we don't have
Chunks were discarded if they belong to unprioritized pieces, even if those pieces were previously prioritized. May be contributing to #253.
2018-06-24 19:40:53 +10:00
Matt Joiner
ad03e64722 Retain interest if requests are outstanding and don't clear peer requests if they send not_interested
Apparent shortcomings found when trying new request algorithms.
2018-06-23 22:32:11 +10:00
Matt Joiner
159c4a0e28 Ensure 64-bit alignment of ConnStats fields
Fixes #262.
2018-06-23 18:33:56 +10:00
Matt Joiner
fefeef4ee9 Merge branch 'dev' 2018-06-22 17:43:51 +10:00
Matt Joiner
70093a4db3 Update accept limit parameters 2018-06-22 17:43:02 +10:00
Matt Joiner
96050948c2 Use scope timer in Torrent.writeChunk 2018-06-21 23:22:13 +10:00
Denis Kuzmenok
62637ce52d moving upnp to a separate repository 2018-06-19 23:00:19 +10:00
Matt Joiner
802e121a64 Improve logging in a test 2018-06-17 21:21:24 +10:00
Matt Joiner
0f5a2f0c05 Disable accept rate limiting by default in tests 2018-06-17 21:20:41 +10:00
Matt Joiner
c1d1082136 Fix multiLess.StrictNext 2018-06-17 21:11:01 +10:00
Matt Joiner
0ea4383efc Fix build error with recent go version 2018-06-17 17:12:06 +10:00
Matt Joiner
4939dd4e57 Add some tests for net.Addr.Network values in various situations 2018-06-17 16:21:57 +10:00
Matt Joiner
c5cc570e42 bencode: Remove string allocation when parsing strings 2018-06-17 16:21:04 +10:00
Matt Joiner
2b1068885c cmd/torrent-metainfo-pprint: Use bufio input and enable envpprof 2018-06-17 16:20:02 +10:00
Matt Joiner
4fafad46b2 Log and handle error with bad tracker URLs 2018-06-17 16:19:24 +10:00
Matt Joiner
3a17708c78 Move chunk expvars into torrent prefix 2018-06-17 16:18:22 +10:00
Matt Joiner
f137bfdd61 Use RLock for Client.WriteStatus 2018-06-17 16:11:50 +10:00
ia
fd7b23e527 all: gofmt
Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
2018-06-17 15:49:58 +10:00
Matt Joiner
68e88977d5 Remove TestUTPRawConn
It's a bit racy and depends on flaky network. Something like this belongs in the utp package anyway.
2018-06-16 20:17:05 +10:00
Matt Joiner
4c471be802 Add connection.hasPreferredNetworkOver and friends 2018-06-16 17:14:47 +10:00
Matt Joiner
7a5aa2c42f Fix some formatting of ConnStats fields 2018-06-16 17:10:56 +10:00
Matt Joiner
8732aa9cf1 Add multiLess and use it for worseConn 2018-06-16 17:04:12 +10:00
Matt Joiner
2852fee357 Fix some testing code for Config->ClientConfig 2018-06-16 17:01:21 +10:00
Matt Joiner
174120e1e8 Rework Torrent pending requests assertions
Should provide more info, and sooner for #249.
2018-06-16 17:00:50 +10:00