pg-listen
pg-listen copied to clipboard
Feature Request: allow a retry policy for the first connection
It seems like there is no retry on first connection, IMHO it's a common use-case, especially when multiple services are started in parallel
There IS retry on first connection, but connect() rejects the promise it returns. If you catch the rejection, it continues to retry and later emits a connected event when it eventually connects.
I propose changing the interface so that the promise returned by connect() doesn't reject or resolve until the first connection is made or retries time out.