Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot maintain a pool with 1 connection that is allowed to idle #2

Open
geertweening opened this issue Oct 8, 2014 · 1 comment
Open

Comments

@geertweening
Copy link
Contributor

When trying to create a pool with the following options I expect to have 1 object available at all times and the object not to be destroyed when it times out.

options {
  "refreshIdle": false,
  "min": 1,
  "max": 1
}

Instead the object is destroyed when the timeout is hit. This happens since the Pool constructor will assume the min should always be at least 1 less than the max. The options above end up resulting in a max of 1 and a min of 0

A simple solution could be to remove the max-1 assumption for the min value.

@geertweening
Copy link
Contributor Author

@tgriesser @coopernurse any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant