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:
parent
a02aebaa4b
commit
98e19af5eb
|
@ -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
|
||||
|
|
|
@ -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(()) => {
|
||||
|
|
Loading…
Reference in New Issue