Minor optimization while creating quic connection

This commit is contained in:
godmodegalactus 2024-03-19 16:08:27 +01:00
parent 4bcc9ddb6c
commit 6802852bbe
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
1 changed files with 10 additions and 0 deletions

View File

@ -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) {