aquatic: lock connections and torrents together; optimize handler

Handler: don't stop collecting requests early unless mutex can
be unlocked.
This commit is contained in:
Joakim Frostegård 2020-04-12 14:44:34 +02:00
parent 62a40317f9
commit 2779b6ec3a
5 changed files with 62 additions and 46 deletions

View file

@ -2,9 +2,6 @@
## aquatic
* `thread 'main' panicked at 'overflow when subtracting duration from instant', src/libstd/time.rs:374:9`
* Put connections and torrent in a struct behind a commong lock. Add
functionality for checking if mutex is unlocked before quitting to
collect requests from channel (try_recv) up to a limit.
* Handle Ipv4 and Ipv6 peers. Probably split state. Ipv4 peers can't make
use of Ipv6 ones. Ipv6 ones may or may note be able to make use of Ipv4
ones, have to check.