2
0
mirror of synced 2025-02-24 22:58:28 +00:00

2945 Commits

Author SHA1 Message Date
Matt Joiner
d6fcf7a32a Use separate squirrel module 2021-08-25 14:37:00 +10:00
Matt Joiner
19d5905b6c Removed unused sqlite "provider" storage 2021-08-25 12:35:07 +10:00
Matt Joiner
8df24008ea Embed SQL 2021-08-24 22:24:39 +10:00
Matt Joiner
08d2dea5b4 Implement {Set,Get}Tag on SquirrelBlob 2021-08-24 18:37:38 +10:00
Matt Joiner
f2f541a46b Begin extracting 'squirrel' from storage/sqlite 2021-08-24 17:52:31 +10:00
Matt Joiner
9b6e191b0a Avoid reallocating keep alive timer on each pass 2021-08-22 20:05:53 +10:00
Matt Joiner
4a1de735fa Don't run linter on master branch
Super unimpressed with this pedantic rubbish. PRs to adjust the settings welcome.
2021-08-22 17:00:06 +10:00
Matt Joiner
311c5bbb35
Update install command 2021-08-22 15:52:35 +10:00
Matt Joiner
5bcce95bbf Change linter workflow branches and name 2021-08-19 16:12:28 +10:00
Matt Joiner
72c74f7800 Remove unused code 2021-08-19 16:06:46 +10:00
Matt Joiner
5cfe54251a Update staticcheck go target to 1.16 2021-08-19 16:06:24 +10:00
Matt Joiner
3d03438480 Disable excessively pedantic linters 2021-08-19 16:05:58 +10:00
Matt Joiner
6b03f00093 Fix data race closing incoming PeerConn 2021-08-19 13:37:00 +10:00
Matt Joiner
8a65ef627d Set direct sqlite storage conn to nil on close
This might help catch the reason for SQLITE_MISUSE in getCapacity.
2021-08-19 13:37:00 +10:00
Matt Joiner
092dc74458 Rewrite peerConnMsgWriter.run 2021-08-19 13:37:00 +10:00
Matt Joiner
8f187411cc Set testing keep alive timeout to 1 millisecond
If it's too fast, we get stuck trying to send keep alives rather than actually communicating with the peer.
2021-08-19 13:37:00 +10:00
Matt Joiner
16c4b08885 Fix deadlock when checking whether to send keep alive 2021-08-19 13:37:00 +10:00
Matt Joiner
a3c2d76b4a Limit keep alives for rate limited download test 2021-08-19 13:37:00 +10:00
Matt Joiner
588a7b6149 Fix race in assigning keep alive timer 2021-08-19 13:37:00 +10:00
Matt Joiner
dcb2e5b53b Use different keep alive timeout in tests
Exposes bug found in email discussions resulting from https://github.com/anacrolix/torrent/discussions/547.
2021-08-19 13:37:00 +10:00
Bora M. Alper
16176b762e
Add linter CI (#542)
* Add linter CI

Signed-off-by: Bora M. Alper <bora@boramalper.org>

* Make gosec CI ignore SHA1 and upload sarif

Signed-off-by: Bora M. Alper <bora@boramalper.org>

* Fix formatting of source files

Signed-off-by: Bora M. Alper <bora@boramalper.org>

* Make go vet ignore unkeyed composite literals and fix other warnings

Signed-off-by: Bora M. Alper <bora@boramalper.org>

* Make staticcheck ignore unused methods and fix other warnings

Signed-off-by: Bora M. Alper <bora@boramalper.org>

* Use golangci-lint

Signed-off-by: Bora M. Alper <bora@boramalper.org>
2021-08-16 11:11:31 +10:00
Matt Joiner
22c5a94a6a Use roaring.Bitmap directly for completed pieces
Looking at improving the performance around this per https://github.com/anacrolix/torrent/discussions/547#discussion-3522317.
2021-08-16 11:07:10 +10:00
Matt Joiner
cc0abf4fd2 Set go 1.17 in go.mod 2021-08-16 10:38:43 +10:00
Matt Joiner
909b2bb4b5 go get -u 2021-08-16 10:37:19 +10:00
Matt Joiner
450e8b0f7d Fix mmap panic on darwin with Go 1.17 2021-08-13 14:02:37 +10:00
Matt Joiner
901a8b1b36 Don't panic on int parse failures
This means for UnmarshalTypeErrors we now include context. There are still some other error types remaining that are thrown up via panic.
2021-08-12 13:46:02 +10:00
Matt Joiner
a76fad32eb Fix panic unmarshalling bencode dict into unsupported type 2021-08-12 12:16:53 +10:00
Matt Joiner
d03de7669b Fix allocation of empty DhtNodes in TorrentSpec
https://github.com/anacrolix/torrent/pull/536#issuecomment-896392738
2021-08-11 12:27:00 +10:00
Matt Joiner
87294355fb Fix race in sqlite direct storage init
There's a race between starting the blob flusher and assigning the timer to the storage client.
2021-08-11 09:44:09 +10:00
Alfonso Montero
88c0a85e44
Readme: Add downstream project (#543) 2021-08-10 11:13:00 +10:00
Matt Joiner
d42f2516a4 Increase request update interval if there's no signalling 2021-08-01 22:52:51 +10:00
Matt Joiner
7096da9f03 Minimize allocations and resizing in request computation 2021-08-01 22:02:40 +10:00
Matt Joiner
e04c9a13f1 Precompute File.DisplayPath
This is an optimization for dir lookups in torrentfs.
2021-08-01 22:01:24 +10:00
Matt Joiner
555cb064dd cmd/torrentfs: Fix panic on missing info 2021-08-01 21:38:35 +10:00
Matt Joiner
83749028ec Trim UDP tracker client read allocations 2021-07-26 10:18:24 +10:00
Matt Joiner
1d53c170b0 Close torrent storage asynchronously on drop 2021-07-17 19:10:07 +10:00
Matt Joiner
5eab39001f Add debug level to piece hash failure log message 2021-07-17 18:52:41 +10:00
Matt Joiner
3b62b0054d Fix go:build directives 2021-07-14 14:35:52 +10:00
Matt Joiner
e1cac00bd5
Remove unused badges 2021-07-02 14:43:13 +10:00
Matt Joiner
4fb13a1868 Fix race in concurrent connects in UDP tracker 2021-06-27 11:57:28 +10:00
ucwong
8b39fcf68b
missinggo go.mod fix (#526) 2021-06-26 10:31:50 +10:00
Matt Joiner
9c81516139 Check that udp conn ID age is non-zero 2021-06-25 15:00:39 +10:00
Matt Joiner
ff8557cf7e Add http tracker AllowKeepAlive 2021-06-25 15:00:09 +10:00
Matt Joiner
a570b83870 Update and expose default client identifiers 2021-06-25 11:29:59 +10:00
Matt Joiner
d4bf547801 Add udp tracker scrape support 2021-06-24 23:13:35 +10:00
Matt Joiner
65f507a792 Pull AnnounceOpt into tracker package 2021-06-24 23:13:35 +10:00
Matt Joiner
a3159e6b11 Cancel writer after request 2021-06-24 23:13:35 +10:00
Matt Joiner
4bcf71c729 Don't log dispatch errors 2021-06-24 23:13:35 +10:00
Matt Joiner
98a1423732 Extract protocol agnostic tracker Client 2021-06-24 23:13:35 +10:00
Matt Joiner
101a269873 Rewrite udp announce to use udp client 2021-06-24 23:13:35 +10:00