Skip to content

Commit

Permalink
Minor optimization while creating quic connection
Browse files Browse the repository at this point in the history
  • Loading branch information
godmodegalactus committed Mar 19, 2024
1 parent 4bcc9dd commit 6802852
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions services/src/tpu_utils/tpu_connection_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ impl ActiveConnection {
})
};

// create atleast one connection before waiting from transactions
if let Ok(PooledConnection { connection, permit }) =
connection_pool.get_pooled_connection().await
{
tokio::task::spawn(async move {
let _permit = permit;
connection.get_connection().await;
});
}

'main_loop: loop {
// exit signal set
if exit_signal.load(Ordering::Relaxed) {
Expand Down

0 comments on commit 6802852

Please sign in to comment.