Open dbxiaoqiang opened 6 years ago
inside start()
there is check to stop a "draining" pool from "starting" again https://github.com/coopernurse/node-pool/blob/master/lib/Pool.js#L388:
start() {
if (this._draining === true) {
return;
}
if (this._started === true) {
return;
}
this._started = true;
this._scheduleEvictorRun();
this._ensureMinimum();
}
so this means in acquire()
it will try to start the pool (but not succed), and then the next if
statement will cause the method to return a rejected promise.
Does that make sense?
(I have to admit that these internals functions are a little messy and could have better internal interfaces)
hello, I have a question about these codes. pool.js
In this function the pool is started but if the pool had been drained the pool's status is still drained Perhaps it will be a issue. I think if the pool has been drained then it will never be acquired.