Skip to content

Commit 4c9c41e

Browse files
committed
feat: port
1 parent 3f0cc7e commit 4c9c41e

File tree

1 file changed

+1
-1
lines changed
  • frameworks/Rust/hyperlane/src

1 file changed

+1
-1
lines changed

frameworks/Rust/hyperlane/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub async fn connection_db() -> DbPoolConnection {
115115
DATABASE_NAME
116116
),
117117
};
118-
let pool_size: u32 = (get_thread_count() << 2).min(100) as u32;
118+
let pool_size: u32 = (get_thread_count() >> 2).max(1).min(100) as u32;
119119
let pool: DbPoolConnection = PgPoolOptions::new()
120120
.min_connections(pool_size)
121121
.max_lifetime(None)

0 commit comments

Comments
 (0)