Commit Graph

1769 Commits

Author SHA1 Message Date
Matt Joiner 3ed8274384 Abstract out making a cancel message 2017-09-18 13:42:42 +10:00
Matt Joiner 9e6cdff175 storage: Don't add empty mmaps to the mmap span 2017-09-18 13:41:19 +10:00
Matt Joiner 0790516440 Only run connection.Close once
Avoids unnecessary error messages for net.Conn.Close
2017-09-18 13:40:36 +10:00
Matt Joiner 19adb2cac3 Improve mmap storage error messages
Trying to map unusual Info's gave unhelpful messages.
2017-09-18 12:19:34 +10:00
Matt Joiner c93f5d3038 test.sh: Unmount and wait for torrentfs to return after completion 2017-09-18 12:17:28 +10:00
Matt Joiner c85aac6383 Log errors closing connection net.Conn's 2017-09-18 12:16:59 +10:00
Matt Joiner 639c49f1ae Rename fs/unwedge-tests so it gets synced to test servers 2017-09-18 12:16:05 +10:00
Matt Joiner cfa54ead7c Use badStorage for TestPeerInvalidHave 2017-09-18 12:15:14 +10:00
Matt Joiner 07679c3895 Remove test temporary directories when finished
They're all grouped together in a parent directory that gets removed. Testing with mmap storage can generate very large files on bad filesystems.
2017-09-18 12:14:16 +10:00
Matt Joiner bb53c97d38 Move uploading to the connection writer 2017-09-18 12:09:08 +10:00
Matt Joiner ed0fa62340 Comment and formatting 2017-09-17 00:45:12 +10:00
Matt Joiner 69ffb9bc8d Fix build error 2017-09-17 00:44:09 +10:00
Matt Joiner 846da66103 Merge pull request #188 from boramalper/KnownSwarm
added the initial version of the (t *Torrent) KnownSwarm() function
2017-09-17 00:20:00 +10:00
Bora M. Alper a66b0e83f3 added support for half-open peers in KnownSwarm() function 2017-09-16 11:48:16 +01:00
Matt Joiner b3137b1ede Make type piece public 2017-09-15 19:35:16 +10:00
Matt Joiner f7e07237ed fs: Fix tests now that data verification isn't automatic 2017-09-15 19:34:42 +10:00
Matt Joiner 2aa20b3e22 Don't verify data at startup, add Torrent.Piece.VerifyData and Torrent.VerifyData for this purpose
This has the side effect of deflaking a lot of tests that race to verify data when a torrent is added.
2017-09-15 19:22:32 +10:00
Matt Joiner b39df82fbc Include peer data with half open connections 2017-09-15 19:10:09 +10:00
Matt Joiner 846ac2d33e Herp 2017-09-15 12:56:54 +10:00
Matt Joiner d4576a56d9 Add some expvars to track uTP/TCP and PHE fallbacks for outgoing connections 2017-09-15 12:56:15 +10:00
Matt Joiner 7fdc750166 mse: Make plaintext mode the default when protocol header encryption is in use 2017-09-15 12:54:29 +10:00
Matt Joiner 5d3ee0a531 Fix panic when error occurs binding uTP socket
Fixes #187.
2017-09-14 00:25:29 +10:00
Matt Joiner 881f1a7e35 Support plaintext crypto method for protocol header encryption 2017-09-13 18:20:20 +10:00
Matt Joiner 29e06fb83c mse: Support plaintext crypto mode 2017-09-13 16:19:14 +10:00
Matt Joiner 11165d4fa5 mse: Error if initial payload exceeds maximum size 2017-09-13 16:18:15 +10:00
Matt Joiner 7e056f7753 mse: Reuse writer write buffer 2017-09-13 01:00:43 +10:00
Matt Joiner f1d292203e mse: Add a read/write benchmark 2017-09-13 00:58:54 +10:00
Bora M. Alper f87b732959 added the initial version of the (t *Torrent) KnownSwarm() function 2017-09-12 15:22:53 +01:00
Matt Joiner 260806a6f2 peer_protocol: Improve piece decoding benchmark 2017-09-12 21:32:01 +10:00
Matt Joiner 01fee38709 peer_protocol: Add a benchmark for decoding pieces 2017-09-12 21:12:56 +10:00
Matt Joiner 98eac5343e mse: Remove unused function 2017-09-12 19:30:05 +10:00
Matt Joiner 16433297d7 Merge branch 'master' into pull-writer 2017-09-12 18:32:40 +10:00
Matt Joiner cee24fe21b storage: Add TODO about handling Close errors 2017-09-12 18:31:56 +10:00
Matt Joiner 2b01d2976b README: Improve wording around torrent as a library 2017-09-12 18:31:56 +10:00
Matt Joiner e25cfdf6b2 The bencode README is markdown 2017-09-12 18:31:56 +10:00
Matt Joiner 76a81b5e54 Merge pull request #185 from mh-cbon/patch-1
Update README
2017-09-12 18:28:35 +10:00
Matt Joiner 128b331b48 Remove mention of the mobile branch from README 2017-09-12 18:26:14 +10:00
mh-cbon 54a3090f7e Update README 2017-09-05 16:42:37 +02:00
Matt Joiner 4e8f6b8e5b Optimize nextRequestState to return cancel and new requests, and reinstate requestsLowWater 2017-09-02 10:36:43 +10:00
Matt Joiner bad6f07f5e Wrap writerCond in tickleWriter and be more selective about using it 2017-09-01 15:26:50 +10:00
Matt Joiner 705de83a5a TestUTPRawConn: More tidying, and slow down the rate 2017-09-01 15:22:08 +10:00
Matt Joiner 158dab71c9 Use require in some places in TestUTPRawConn 2017-09-01 15:09:10 +10:00
Matt Joiner 110764480e Avoid triggering writer cond where possible 2017-09-01 12:09:41 +10:00
Matt Joiner 361cdc0e08 Track buffered but not posted messages, and unify the expvar names for those counters 2017-09-01 10:53:59 +10:00
Matt Joiner e3479b0bb3 Remove unused code 2017-09-01 10:46:26 +10:00
Matt Joiner d934ec7e30 Add some variables to track fillBuffer effectiveness 2017-09-01 10:36:43 +10:00
Matt Joiner 016b238cc5 cmd/torrent: Enhance debugging 2017-09-01 10:35:40 +10:00
Matt Joiner 13e79039f2 Generate requests, cancels and interest state in the connection writer 2017-08-31 23:48:52 +10:00
Matt Joiner 986b9093a0 Make connection.writer pull from a buffer 2017-08-31 16:26:45 +10:00
Matt Joiner c4f5a49c97 Panics while decoding messages in connection.mainLoopRead would trigger more panics 2017-08-31 16:25:49 +10:00