aquatic_ws_load_test: for single connection, use same PeerId

This commit is contained in:
Joakim Frostegård 2020-08-03 05:27:40 +02:00
parent 7733ee98ca
commit e916780438
3 changed files with 16 additions and 7 deletions

View file

@ -176,6 +176,7 @@ impl Connection {
config: &Config,
state: &LoadTestState,
rng: &mut impl Rng,
connection_id: usize
) -> bool { // bool = remove connection
if !self.can_send {
return false;
@ -185,7 +186,8 @@ impl Connection {
let request = create_random_request(
&config,
&state,
rng
rng,
connection_id
);
// If self.send_answer is set and request is announce request, make
@ -217,7 +219,7 @@ impl Connection {
false
}
Err(err) => {
// eprintln!("send request error: {:?}", err);
eprintln!("send request error: {:?}", err);
true
}
@ -284,6 +286,7 @@ pub fn run_socket_thread(
config,
&state,
&mut rng,
*k
);
if drop_connection {