increasing max ttl

This commit is contained in:
godmodegalactus 2024-05-29 17:51:11 +02:00
parent f1a877ecfb
commit 9145ee7bc5
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
3 changed files with 14 additions and 25 deletions

View File

@ -127,7 +127,7 @@ impl Client {
let _ = sender.send(message); let _ = sender.send(message);
} }
Err(e) => { Err(e) => {
log::error!("Error getting message {}", e); log::trace!("Error getting message {}", e);
} }
} }
}); });

View File

@ -3,7 +3,7 @@ pub const MAX_ALLOWED_PARTIAL_RESPONSES: usize = 32 * 1024;
pub const DEFAULT_MAX_RECIEVE_WINDOW_SIZE: u64 = 1024 * 1024; // 1 MBs pub const DEFAULT_MAX_RECIEVE_WINDOW_SIZE: u64 = 1024 * 1024; // 1 MBs
pub const DEFAULT_CONNECTION_TIMEOUT: u64 = 10; pub const DEFAULT_CONNECTION_TIMEOUT: u64 = 10;
pub const DEFAULT_MAX_NB_CONNECTIONS: u64 = 10; pub const DEFAULT_MAX_NB_CONNECTIONS: u64 = 10;
pub const DEFAULT_MAX_ACK_DELAY: u64 = 250; pub const DEFAULT_MAX_ACK_DELAY: u64 = 400;
pub const DEFAULT_ACK_EXPONENT: u64 = 3; pub const DEFAULT_ACK_EXPONENT: u64 = 3;
pub const ALPN_GEYSER_PROTOCOL_ID: &[u8] = b"geyser"; pub const ALPN_GEYSER_PROTOCOL_ID: &[u8] = b"geyser";
pub const MAX_DATAGRAM_SIZE: usize = 1350; // MAX: 65527 pub const MAX_DATAGRAM_SIZE: usize = 2000; // MAX: 65527

View File

@ -299,6 +299,7 @@ pub fn server_loop(
} }
} }
#[allow(clippy::too_many_arguments)]
fn create_client_task( fn create_client_task(
connection: quiche::Connection, connection: quiche::Connection,
receiver: mpsc::Receiver<(quiche::RecvInfo, Vec<u8>)>, receiver: mpsc::Receiver<(quiche::RecvInfo, Vec<u8>)>,
@ -384,16 +385,8 @@ fn create_client_task(
); );
} }
} }
if send_message( send_message(&mut connection, &mut partial_responses, stream_id, &message)
&mut connection, .is_err()
&mut partial_responses,
stream_id,
&message,
).is_err() {
true
} else {
false
}
} }
Err(e) => { Err(e) => {
match e { match e {
@ -406,20 +399,16 @@ fn create_client_task(
} }
}; };
if close && !closed { if close && !closed && stop_laggy_client {
if stop_laggy_client && !closed {
if let Err(e) = connection.close(true, 1, b"laggy client") { if let Err(e) = connection.close(true, 1, b"laggy client") {
if e != quiche::Error::Done { if e != quiche::Error::Done {
log::error!("error closing client : {}", e); log::error!("error closing client : {}", e);
} }
} else { } else {
log::info!( log::info!("Stopping laggy client : {}", connection.trace_id(),);
"Stopping laggy client : {}",
connection.trace_id(),
);
} }
closed = true; closed = true;
} break;
} }
} }