Commit Graph

1643 Commits

Author SHA1 Message Date
Matt Joiner 8195e8df7b Improve some doc comments 2017-12-29 12:16:05 +11:00
Matt Joiner f408e19a7a Survive panics while writing chunks
Also improve the comment on that code
2017-12-29 12:15:33 +11:00
Matt Joiner 898db894e0 When queuing a piece for hashing after receiving a chunk, clear all the dirty chunks
This should fix a bug triggered by storage inconsistencies.
2017-12-28 23:59:30 +11:00
Matt Joiner 25cf92502d Improve a log message 2017-12-28 23:58:07 +11:00
Matt Joiner c672491337
Merge pull request #219 from elgatito/http_user_agent
adding http user-agent setters and usage
2017-12-28 21:05:55 +11:00
Denis Kuzmenok 455a414204 adding http user-agent setters and usage 2017-12-28 10:47:51 +02:00
Denis a41adc49b5 added disable_libutp build flag usage (#215) 2017-12-06 11:56:26 +11:00
Matt Joiner 54a7d83c45 Log dropping of bad peers in debug mode only 2017-12-03 13:44:37 +11:00
Matt Joiner b9a1cb5b8b missinggo.LimitLen changed 2017-12-03 13:44:08 +11:00
Matt Joiner fa7c2e2bc6 Code comments 2017-12-03 00:35:09 +11:00
Matt Joiner 520da249a1 Test that mmap size doesn't exceed system memory address width
Should fix http://paste.ubuntu.com/26074620/
2017-12-02 10:26:09 +11:00
Matt Joiner 27253eb0d0 Fix panic in Torrent.addrActive if there are closed connections
Fixes #214
2017-12-02 10:01:27 +11:00
Matt Joiner 47622fad36 Fix the Stats panic in #214 2017-12-02 09:58:08 +11:00
Matt Joiner d77e939944 Synchronize access to storage 2017-12-01 23:09:07 +11:00
Matt Joiner 72340f6ffc Remove racy part of test 2017-12-01 23:08:53 +11:00
Matt Joiner b0914f2645 Improve issue #211 test name 2017-12-01 18:13:21 +11:00
Matt Joiner 4190856b6c sortimports 2017-12-01 18:12:29 +11:00
Matt Joiner 10f7a8124a Add test for #211 2017-12-01 18:11:20 +11:00
Matt Joiner afa9d2ba28 Torrent.bytesLeft was taking a copy instead of pointer to Piece 2017-12-01 17:58:42 +11:00
Matt Joiner 2daa604eb2 Publish piece state changes after verifying piece 2017-12-01 14:03:05 +11:00
Matt Joiner eed0743d4e bencode.scanner.ReadByte returned errors when it shouldn't have 2017-11-10 23:44:24 +11:00
Matt Joiner 74c5d425fb bencode: Handle encoding big.Ints 2017-11-08 21:34:24 +11:00
Matt Joiner 79a0e0f1fd bencode: Tidy import block 2017-11-08 20:58:35 +11:00
Matt Joiner 8f7720edb2 Merge commit '6ab65a49a8a72dea1a28968b2ab42a85fd4566ec'
# Conflicts:
#	config.go
2017-11-08 20:23:15 +11:00
Matt Joiner da9cbc7cf0 metainfo: Omit empty Metainfo.InfoBytes 2017-11-08 19:57:05 +11:00
Matt Joiner 163a63f9a7 Torrent.Metainfo: Don't return incomplete metadata bytes
Fixes #208
2017-11-08 19:56:20 +11:00
Matt Joiner f960ec1b65 cmd/torrent-metainfo-pprint: Just take a single metainfo to stdin
Move processing into its own function too.
2017-11-08 19:33:05 +11:00
Matt Joiner 3aa1e8f3ef Add a test for behaviour after getting metadata_size and before GotInfo
#208
2017-11-08 19:31:10 +11:00
Matt Joiner 1b9606ae75 The "m" field in the extended handshake is not mandatory 2017-11-08 19:29:55 +11:00
Matt Joiner 2f8a2ada2e Config.Debug isn't just for logging 2017-11-08 19:29:01 +11:00
Matt Joiner 8712cc25d0 Make Client.PeerID return [20]byte 2017-11-08 19:28:37 +11:00
Matt Joiner b38996ae2a Generalise use of peerExtensionBytes 2017-11-08 19:28:03 +11:00
Matt Joiner 7eb62eec0d Move some code around 2017-11-08 15:00:18 +11:00
themihai 6ab65a49a8 feat(config): Allows the torrent client to customise the client identity and connection config 2017-11-07 20:14:13 +02:00
Matt Joiner ff1bd84e7e Fix #205 2017-11-08 00:34:59 +11:00
Matt Joiner cecc70f4cc More megacheck 2017-11-08 00:12:34 +11:00
Matt Joiner 9757f04cf8 Apply megacheck to torrent package 2017-11-07 16:11:59 +11:00
Matt Joiner be3f32e962 Fix a lot of noisy logging and test warnings 2017-11-07 16:00:08 +11:00
Matt Joiner 62b1e1b749 Unbiased request ordering was requesting chunks the peer doesn't have 2017-11-06 14:53:00 +11:00
Matt Joiner 82093937d5 Ignore expected error 2017-11-06 14:01:07 +11:00
Matt Joiner e888e6eb85 Add a link to Trickl 2017-11-06 13:42:46 +11:00
Matt Joiner f060f0cb02 Comment on bencode.Decoder.Offset 2017-11-05 15:45:30 +11:00
Matt Joiner edf2495b1f Expose bencode.Decoder.Offset 2017-11-05 15:42:37 +11:00
Matt Joiner 2c6b842bbf Remove noisy log message 2017-11-05 15:39:36 +11:00
Matt Joiner fce1fe1661 bencode: Implement unbuffered scanner used by NewDecoder
Minimizes unused reads into the input Reader stream
2017-11-05 15:39:36 +11:00
Matt Joiner be33fc4476 Kick connections requesting pieces we don't have
This was removed at some point, and made the requests received for missing pieces expvar unused.
2017-11-05 15:39:36 +11:00
Matt Joiner 361c8654c7 Add some TODOs 2017-11-05 15:39:35 +11:00
Samuel 3e74396c66 Aggressive Upload (#203)
* Aggressive Upload Config

* Aggressive Upload

* Flip config option.

* Flip Aggressive Upload Config Option
2017-11-05 14:04:33 +11:00
Matt Joiner f12058fc74 Add missing whitespace 2017-11-04 17:08:02 +11:00
Matt Joiner 9bf50493c3 mse: Move sliceIter into test file 2017-11-04 17:07:42 +11:00