split connection and torrent mutexes again

This commit is contained in:
Joakim Frostegård 2020-04-13 12:00:46 +02:00
parent b9a9a82207
commit ca52b44389
5 changed files with 90 additions and 82 deletions

View file

@ -95,9 +95,9 @@ pub fn create_requests(
let mut requests = Vec::new();
let d = state.handler_data.lock();
let connections = state.connections.lock();
let connection_keys: Vec<ConnectionKey> = d.connections.keys()
let connection_keys: Vec<ConnectionKey> = connections.keys()
.take(number)
.cloned()
.collect();

View file

@ -96,9 +96,9 @@ pub fn create_requests(
let max_index = info_hashes.len() - 1;
let d = state.handler_data.lock();
let connections = state.connections.lock();
let connection_keys: Vec<ConnectionKey> = d.connections.keys()
let connection_keys: Vec<ConnectionKey> = connections.keys()
.take(number)
.cloned()
.collect();