creationix/node-persistence

Fix race condition in connection and store creation

Opened this issue · 1 comments

Since creating a store and connection uses constructors, it doesn't allow for easy async callbacks for when it's ready to use. There is the connect event on the connection, but I think we can do better.

This ticket is to remind me to fix this race condition and use proper async callbacks so we don't need hacks like the timeout in "test/common.js"

Okay, I thought my issue might have been related to this. I'll keep poking around the new release and see what else I can find!