diff --git a/core/src/warm_quic_cache_service.rs b/core/src/warm_quic_cache_service.rs index 0d0fb5cae..b7f196661 100644 --- a/core/src/warm_quic_cache_service.rs +++ b/core/src/warm_quic_cache_service.rs @@ -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 diff --git a/quic-client/src/nonblocking/quic_client.rs b/quic-client/src/nonblocking/quic_client.rs index 974559910..3545b409b 100644 --- a/quic-client/src/nonblocking/quic_client.rs +++ b/quic-client/src/nonblocking/quic_client.rs @@ -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(()) => {