Minor optimization while creating quic connection
This commit is contained in:
parent
4bcc9ddb6c
commit
6802852bbe
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue