Do not do send in cache warmer -- just establish connections (#32898)

* Do not do send in cache warmer -- just establish connections
This commit is contained in:
Lijun Wang 2023-08-21 12:29:45 -07:00 committed by GitHub
parent a02aebaa4b
commit 98e19af5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -54,7 +54,7 @@ impl WarmQuicCacheService {
.lookup_contact_info(&leader_pubkey, |node| node.tpu(Protocol::QUIC))
{
let conn = connection_cache.get_connection(&addr);
if let Err(err) = conn.send_data(&[0u8]) {
if let Err(err) = conn.send_data(&[]) {
warn!(
"Failed to warmup QUIC connection to the leader {:?}, Error {:?}",
leader_pubkey, err

View File

@ -384,6 +384,11 @@ impl QuicClient {
.acks
.update_stat(&self.stats.acks, new_stats.frame_tx.acks);
if data.is_empty() {
// no need to send packet as it is only for warming connections
return Ok(connection);
}
last_connection_id = connection.stable_id();
match Self::_send_buffer_using_conn(data, &connection).await {
Ok(()) => {