The number of connections in the connection pool was not increased
when it is less than the spare setting.
In v4.0.x, unlike v3.0.x, `pool->max_pending` is a configurable value,
with a default value of zero.
Therefore, in the default setting, the conditional expression
`pool->state.pending >= pool->max_pending`
always is true and the number of connections is not increased.
This commit fixes it by using `pool->pending_window`
instead of `pool->max_pending`.
/*
* Don't open too many pending connections.
*/
- if (pool->state.pending >= pool->max_pending) goto manage_connections;
+ if (pool->state.pending >= pool->pending_window) goto manage_connections;
/*
* Don't open too many connections, even if we