exp backoff and theads handling
This commit is contained in:
@@ -60,7 +60,7 @@ pub async fn perform_handshake(
|
||||
println!("username: {}, ip: {}", username.clone(), ip.clone());
|
||||
let crypto_pair = sd.cryptopair_ref();
|
||||
let senders = sd.senders_ref();
|
||||
let messages_list = sd.messages_list_ref();
|
||||
|
||||
let id = generate_id();
|
||||
let server_addr_query = get_socket_address(username.clone(), ip.clone());
|
||||
match server_addr_query.await {
|
||||
@@ -73,12 +73,11 @@ pub async fn perform_handshake(
|
||||
let hello_handshake = construct_message(1, payload, id, crypto_pair);
|
||||
match hello_handshake {
|
||||
Some(handshake_message) => {
|
||||
senders.send_via(
|
||||
0,
|
||||
senders.send_dispatch(
|
||||
handshake_message,
|
||||
sockaddr_bytes.to_string(),
|
||||
is_server_handshake,
|
||||
messages_list,
|
||||
sd.messages_list(),
|
||||
);
|
||||
}
|
||||
None => {}
|
||||
|
||||
Reference in New Issue
Block a user