Commit Graph

1863 Commits

Author SHA1 Message Date
Matt Joiner 174120e1e8 Rework Torrent pending requests assertions
Should provide more info, and sooner for #249.
2018-06-16 17:00:50 +10:00
Matt Joiner 0caafd8e87 Allow dropping connections to the same peer ID
Necessary for a test that expects one connection to each other Client.
2018-06-16 16:40:37 +10:00
Matt Joiner 0f90af85f1 Torrent.Stats: RLock instead of Lock 2018-06-16 16:38:14 +10:00
Matt Joiner 70dfc1f518 Allow disabling accept limiting and modify some constants 2018-06-16 16:37:13 +10:00
Matt Joiner 0854161e99 Clear accept limits when adding a new torrent 2018-06-16 16:34:35 +10:00
Matt Joiner cee8e3b9f9 Update external use of ClientConfig 2018-06-16 16:33:40 +10:00
Matt Joiner e97f487d2e Rename Config->ClientConfig and change how defaults work
This is a very breaking change.
2018-06-16 16:30:04 +10:00
Matt Joiner ad5e44eaf5 Add lots of new expvars and perf timers 2018-06-15 22:42:05 +10:00
Matt Joiner 81dcb9b779 Remove old Client.dialTCP 2018-06-15 22:39:37 +10:00
Matt Joiner 8acfc5149b Rate limit incoming IP prefixes
Lots of bad or dishonest incoming handshakes for unwanted torrents.
2018-06-15 22:38:11 +10:00
Matt Joiner 2fb1c022f5 Use DialContext for tcp again
It got lost somewhere along the way.
2018-06-15 14:34:58 +10:00
Matt Joiner fd0fb0051b Update dial expvars 2018-06-15 14:30:31 +10:00
Matt Joiner c9187bf736 Update some tests now that adding connections is more reliable 2018-06-13 22:02:30 +10:00
Matt Joiner a1d2a32b20 Remove excess newline from log call 2018-06-13 10:56:09 +10:00
Matt Joiner da4a6503c2 Fix race condition in Client.ListenAddrs 2018-06-13 10:53:38 +10:00
Matt Joiner 90f84bda71 Allow adding duplicate connections
I believe this fixes a long-standing race condition when dropping connections to the same peer ID where Clients assume the peer has added connections in the same order. Further commits may address duplicate connections further.
2018-06-13 10:53:11 +10:00
Matt Joiner 5412eef6da Fix Count usage in benchmark 2018-06-12 22:47:46 +10:00
Matt Joiner 5cb73d6a37 Ensure ConnStats spew nicely 2018-06-12 22:40:04 +10:00
Matt Joiner 224522545b Fix build error with recent go version 2018-06-12 21:51:34 +10:00
Matt Joiner 22a939fb02 Remove unused log import 2018-06-12 20:25:32 +10:00
Matt Joiner 817344d630 Remove duplicateClientConns expvar 2018-06-12 20:23:26 +10:00
Matt Joiner 856d5083b5 Update log call 2018-06-12 20:22:54 +10:00
Matt Joiner 360e1dbdd1 Track ConnStats with atomics 2018-06-12 20:21:53 +10:00
Matt Joiner 2007f2c234 Make download cancellable tests more reliable 2018-06-12 20:19:53 +10:00
Matt Joiner a287d069a4 Fix crash adding peers when Torrent is closed 2018-06-12 20:17:15 +10:00
Matt Joiner b024e1cff6 Remove unnecessary use of go keyword 2018-06-12 20:16:17 +10:00
Matt Joiner cea5584d6b Track outgoing through a new field on connection, and rework duplicate connection preferencing 2018-06-12 20:14:00 +10:00
Matt Joiner e9040f8f74 Fix failure in CI on non-critical test due to set -e 2018-06-11 12:44:12 +10:00
Matt Joiner ab48d4731c Include rate limiting and stats in BenchmarkConnectionMainReadLoop 2018-06-11 12:20:51 +10:00
Matt Joiner add2fceaba Merge commit 'cadbacb956fa38a61f3656dc08d71bd68fc966ec' into dev 2018-06-11 11:34:38 +10:00
Matt Joiner cadbacb956
Merge pull request #258 from porjo/master
Fix file permissions
2018-06-11 00:00:25 +10:00
Matt Joiner 5a53d29c75 Minimize lock time in Client.acceptConnections 2018-06-10 10:29:19 +10:00
Matt Joiner ac6ba9f021 Add ConnStats at Client level
ConnStats management is refactored to make this less tedious.
2018-06-10 09:20:33 +10:00
Matt Joiner 415c6f6654 Increment conn read/write stats asynchronously
Acquiring the lock appears to be quite intensive.
2018-06-10 09:20:33 +10:00
Matt Joiner a9bdb438dc Fix timing failures in download cancel tests 2018-06-10 09:20:33 +10:00
Matt Joiner 3d680f8afc Update a link 2018-06-10 09:20:33 +10:00
Ian Bishop ffd41230a6 Fix file permissions 2018-06-09 15:11:28 +02:00
Denis f6ed514c3b added proxy support to the library, using ProxyURL parameter. (#256) 2018-06-08 20:52:36 +10:00
Matt Joiner 37fc800cb1 cmd/torrent: Add -stats flag
Requires updated tagflag package.
2018-06-06 00:40:03 +10:00
Matt Joiner 6354b9b967 Ignore CI test failures with CGO_ENABLED=0
It uses anacrolix/utp which isn't stable or recommended. Timeouts and retrying are needed to work around bugs in that package better.
2018-06-06 00:39:30 +10:00
Matt Joiner 4e257ffdcf go.mod additions for CGO_ENABLED=0 2018-05-25 18:53:14 +10:00
Matt Joiner 7cafedac42 Move internal bloom cmds to dht repo 2018-05-25 18:36:59 +10:00
Matt Joiner 93c24e862f Add go.mod file for vgo 2018-05-25 16:22:54 +10:00
Matt Joiner a1fabaf2f8 Improve Torrent.DownloadPieces documentation
Was mentioned in Gitter.
2018-05-18 14:06:28 +10:00
Matt Joiner 15b828515e Don't listen on IPv6 if DisableIPv6 is set
Fixes #250
2018-05-02 19:24:46 +10:00
Matt Joiner 52896818db Remove vestigial comment 2018-05-02 19:23:05 +10:00
Matt Joiner 39ccb14036 Update TODO file 2018-04-14 21:44:50 +10:00
Matt Joiner df38775630 A few adjustments to prioritized peers usage 2018-04-14 21:44:41 +10:00
Matt Joiner cefcda18c6 Add tests for prioritizedPeers 2018-04-14 21:44:03 +10:00
Matt Joiner 610dbd17ba Fix #244 2018-04-14 21:43:08 +10:00