Skip to content

Commit

Permalink
Update mobc and make its idle connection behavior the same as the rd2…
Browse files Browse the repository at this point in the history
…d sync pool
  • Loading branch information
criminosis committed Sep 1, 2024
1 parent a342d8c commit ec1437d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gremlin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ thiserror = "1.0.20"



mobc = {version = "0.7", optional = true, default-features=false, features = ["unstable"] }
mobc = {version = "0.8", optional = true, default-features=false, features = ["unstable"] }
url = {version = "2.1.0", optional = true}
futures = { version = "0.3.1", optional = true}
pin-project-lite = { version = "0.2", optional = true}
Expand Down
2 changes: 2 additions & 0 deletions gremlin-client/src/aio/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ impl GremlinClient {
.get_timeout(opts.pool_get_connection_timeout)
.max_open(pool_size as u64)
.health_check_interval(opts.pool_healthcheck_interval)
//Makes max idle connections equal to max open, matching the behavior of the sync pool r2d2
.max_idle(0)
.build(manager);

Ok(GremlinClient {
Expand Down

0 comments on commit ec1437d

Please sign in to comment.