neumino / rethinkdbdash

An advanced Node.js driver for RethinkDB with a connection pool, support for streams etc.
MIT License
848 stars 109 forks source link

Delay the creation of each pool #356

Closed aleclarson closed 6 years ago

aleclarson commented 6 years ago

This will allow event listeners to be attached without missing any events.

The only change is wrapping the pool initialization in a setImmediate call.

This fixes #334.

aleclarson commented 6 years ago

It could be argued this change is unnecessary since options.log exists. If you agree, you can close this PR.

And it looks like some more changes are needed before this can be merged, anyway.