Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.connect() returns misleading error #93

Open
Herald85 opened this issue Aug 11, 2020 · 1 comment
Open

client.connect() returns misleading error #93

Herald85 opened this issue Aug 11, 2020 · 1 comment

Comments

@Herald85
Copy link

I'm working with Docker on W10 and it takes DB a bit longer to start than my app container and I was getting Error: connect ECONNREFUSED... from client.connect(). I wanted to solve it with a timer loop with try to connect every 1 second again, but each other call of client.connect() returned an error Client has already been connected.... And that was not true, DB still hasn't started and any query called on such client ended with an error. What I had to do was to close the client and create a completely new instance on which I could try to call connect again.

My points are:

  • connect should be allowed to be called multiple times on one instance if the previous call ended with connection error
  • even if that is not wanted, the error message should not say Client has already been connected, when it is not true (again DB has not yet started)
@demattosanthony
Copy link

Still experiencing this issue today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants