pg-listen icon indicating copy to clipboard operation
pg-listen copied to clipboard

Feature Request: allow a retry policy for the first connection

Open abolognino opened this issue 6 years ago • 1 comments

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

abolognino avatar Jan 08 '20 15:01 abolognino

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.

Jonahss avatar Apr 12 '21 21:04 Jonahss