Commit Graph

2125 Commits

Author SHA1 Message Date
Matt Joiner eb4dad73ae Lots of improvements to logging 2019-08-22 13:59:04 +10:00
Matt Joiner 2a5488f723 Add missing debug level to log statement 2019-08-22 10:20:13 +10:00
Matt Joiner 4850ce6ab3 Restrict the number of concurrent piece hashes
This fixes bad behaviour where running out of file descriptors, and overloading the system with goroutines and concurrent I/O may cause newly started torrents to fail to hash data.
2019-08-22 10:17:06 +10:00
Matt Joiner ee5e459ea3 Tidy up piece completion change handling 2019-08-21 21:06:39 +10:00
Matt Joiner 14fbacd024 Include the piece number when logging piece hash errors 2019-08-21 21:00:47 +10:00
Matt Joiner cb1bf0f413 goimports -local 2019-08-21 20:58:40 +10:00
Matt Joiner f61f14dae0 Make Reader log through its parent 2019-08-21 20:55:43 +10:00
Matt Joiner 5a2c1c9b76 Upgrade to simplified logger 2019-08-21 20:44:12 +10:00
Matt Joiner dfcb852487 gofmt simplify 2019-08-19 12:15:54 +10:00
Matt Joiner fb8c549e9d Add mse/cmd/mse 2019-08-18 16:52:00 +10:00
Matt Joiner f16bea62a1 metainfo: Add fuzzing func 2019-08-18 16:51:20 +10:00
Matt Joiner 03bac6e6b7 go mod tidy 2019-08-15 10:21:00 +10:00
Matt Joiner e3e4a11b16 Add some timing code to Client.dialFirst 2019-08-15 10:17:39 +10:00
Matt Joiner 6013f09f8a Don't include the handshake in the dial timeout for outgoing connections 2019-08-11 13:17:47 +10:00
Matt Joiner 9224303c1e Update all imports of dht to v2 2019-08-10 18:46:07 +10:00
Matt Joiner 5f0b040f25 Include remote address when logging failure to establish outbound connection 2019-07-30 17:26:12 +10:00
Matt Joiner 7b47dcbf51 fs: Fix test failure when default client port is unavailable 2019-07-30 17:25:10 +10:00
Matt Joiner 0b15fda7a8 NewClient nil ClientConfig should use dynamic port
It's pretty hard to test otherwise, if something's already on the default port.
2019-07-30 17:19:14 +10:00
Matt Joiner cbc98e17aa Fix race spewing Client stats 2019-07-30 17:18:09 +10:00
Matt Joiner f7f33dbc01 Don't test with -race or -v for 32-bit
We just want to know that it builds and works for normal use.
2019-07-26 11:00:28 +10:00
Matt Joiner 711d909272 Fix tests on 32-bit 2019-07-26 10:56:13 +10:00
Matt Joiner 011df3da4a Test 32-bit arch on CircleCI
See https://github.com/anacrolix/missinggo/issues/16
2019-07-26 10:49:36 +10:00
Matt Joiner 77b74dd39d Re-order the logic in Piece.VerifyData for better logging 2019-07-25 14:15:36 +10:00
Matt Joiner e9b10f774d Comments on the VerifyData methods 2019-07-25 14:13:42 +10:00
Matt Joiner bbeb69bb5f Ignore cached piece completion state when verifying data
Forcing data to be checked via VerifyData, and probably other places where piece checks are queued were being short-circuited due to cached piece completion. If a piece check is queued, or verifyData called, the cached completion state should be ignored.
2019-07-25 14:10:21 +10:00
Matt Joiner 018de2c96c Improve comments on some config fields 2019-07-23 11:30:05 +10:00
Matt Joiner e9df943d90
Add astronomer rating badge 2019-07-22 22:42:05 +10:00
Matt Joiner 958ff01eab Change the default client port 2019-07-19 16:19:21 +10:00
Matt Joiner 3c0588d661 Add some commented out logging 2019-07-19 16:17:38 +10:00
Matt Joiner f0e7f5e7a0 Add an error check in a test
Managed to get this to fail, and it just panicked.
2019-07-19 16:17:10 +10:00
Matt Joiner 338287486f Always return errors when handshakes or dialing fails
I intend to use xerrors-style error handling for special cases.
2019-07-19 16:15:46 +10:00
Matt Joiner 63d215568a Tidy up function signature 2019-07-19 14:56:29 +10:00
Matt Joiner 76513bfe0b Restart dial timeout for fallback header obfuscation attempt 2019-07-19 14:46:48 +10:00
Matt Joiner 5774859701 Try with the non-preferred header obfuscation if there's an error
The function called was more selective about what it returned as an error, but that style is outdated (should use xerrors), and no longer returns as expected.
2019-07-19 14:13:42 +10:00
Matt Joiner 1d8873552a Rework header obfuscation and add tests for fallbacks 2019-07-19 13:23:36 +10:00
Matt Joiner 90355b3dc7 Add dummy code for emulating the bug in #114
Useful for ensuring that the test can still reproduce the issue with changes to encryption handling.
2019-07-19 13:07:40 +10:00
Matt Joiner 09b587f17b Comments 2019-07-19 13:04:10 +10:00
Matt Joiner fb7293a94f cmd/torrent: Add flag for progress bar 2019-07-19 13:01:36 +10:00
Matt Joiner 93d34dd122 cmd/torrent: Don't log the public IP flag value 2019-07-19 13:00:31 +10:00
Matt Joiner 219ac4ab42 go mod tidy 2019-07-17 18:17:05 +10:00
Matt Joiner 561e3915f3 cmd/torrent-magnet: Add a description to command help output 2019-07-17 18:12:54 +10:00
Matt Joiner 27b7fbe3f3 Fix announcing to S3 HTTP trackers 2019-07-17 18:12:11 +10:00
Matt Joiner b17f0119fd Use fork of elgatito/upnp that contains go module files
Avoids persistent `go: finding github.com/op/go-logging latest` when using vgo.
2019-07-17 18:03:56 +10:00
Matt Joiner 77074b772a Use tagged github.com/gosuri/uiprogress, and update uilive indirect dep
Messing with the combined progress bar and logging output in cmd/torrent and hoping it is improved.
2019-07-17 18:00:40 +10:00
Matt Joiner 9afa2e70d7 cmd/torrent-metainfo-pprint: Fix -files for single-file torrents 2019-07-17 15:28:49 +10:00
Matt Joiner 5b44954223 Send tracker stopped event from the tracker scraper routine
Fixes potential blocking on the announce while the client lock is held, as well as differing arguments to the other announces introduced by #321.
2019-07-17 11:56:25 +10:00
Matt Joiner e56ea362d9 vgo get -u && go mod tidy 2019-07-16 11:08:17 +10:00
Matt Joiner fa0bbe2e07
Create FUNDING.yml 2019-06-24 14:12:14 +10:00
Matt Joiner 4629a92f9a Ignore ".torrent.bolt.db" which is generated by unit tests 2019-06-21 14:53:57 +10:00
Matt Joiner 12958ad384 Refactor Client.dialFirst 2019-06-21 14:50:49 +10:00